Tag Archives: attachment

Office365: Set maximum attachment/email size

Hopefully this helps someone else out there; the amount of PowerShell commands and cmdlets can be quite overwhelming, and knowing what add-on you need for PowerShell to manage your Office365 installations can be a big time waster. Here’s my notes.

1. Windows 7 comes with Powershell v2 as part of the package, and Win8 comes with v3. If you’re using Vista or XP you’ll have to update to at least v2 but that’s outside of this post.

2. Install Microsoft Online Services Sign-On Assistant for IT Pros:

http://www.microsoft.com/en-us/download/details.aspx?id=39267&fwLinkID=286152

(32-bit for 32-bit OS, 64-bit for 64-bit OS)

3. Install Windows Azure AD Module (may be unnecessary for this procedure, but will be necessary for others – I install it by default)

http://technet.microsoft.com/en-us/library/jj151815.aspx

4. Reboot after install.

5. Start Powershell as admin (you will notice a new program group-Windows Azure Active Directory with a Powershell shortcut; it’s safe to start this or the main Powershell program for our purpose).

6. Once in PS, and having your admin credentials for your Office365 subscription, enter the following commands;

$LiveCred = Get-Credential

$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $LiveCred -Authentication Basic –AllowRedirection

Import-PSSession $Session

Get-TransportConfig

‘ now – pay special note to the output from this last command, “Get-TransportConfig” – look for the lines “InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize”. This is your current max for outbound and inbound emails. Most likely it’s at 10MB, and not what you want.

Set-TransportConfig -InternalDsnMaxMessageAttachSize (nn)MB

‘ change the (nn) to a number – in meagabytes – that you want for your maximum. Might be 20, 40, etc… supposedly the global max is 25.

Set-TransportConfig -ExternalDsnMaxMessageAttachSize (nn)MB

‘ again, see above note on what to replace (nn) with…

Get-TransportConfig

‘ now check your config – you should see your new max sizes replaced with what you programmed.

Office365: Set maximum attachment/email size.