Office365: setting maximum mail transport limits (email+attachments)…


Office365: setting maximum mail transport limits (email+attachments)…


** NOTE ** The parameters -“InternalDsnMaxMessageAttachSize” and “ExternalDsnMaxMessageAttachSize” are no longer recognized by the Azure PS add-on module; even though the parameters are visible upon viewing a “Get-TransportConfig”. Apparently Microsoft has now set all attach sizes to/from Office365 mailboxes (somehow I doubt this) to 25MB. The article supplied by MS on this is:
** END NOTE **

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 are my notes.

Steps (11 total)


What version of PS do you have?

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.


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


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


Reboot after install.

Yeah, you know where that is – the power switch. Or the Start menu/shutdown/reboot. If you’re feeling plucky, Win+R “shutdown /r” – of course there will be some scripting people commenting later on other ways too 🙂


Start PowerShell

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).


The COMMANDS – feel Powerful yet?

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 -Credential $LiveCred -Authentication Basic –AllowRedirection

Import-PSSession $Session


Let’s see what our values are here…



Explanation to 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 the new maxmessagesize…

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.

‘ example:

Set-TransportConfig -InternalDsnMaxMessageAttachSize 20MB


Set the external maxmessagesize…

Set-TransportConfig -ExternalDsnMaxMessageAttachSize (nn)MB

‘ Again, see above note on what to replace (nn) with…
‘ Example:

Set-TransportConfig -ExternalDsnMaxMessageAttachSize 20MB

‘ This will set the max incoming message size (individually) to 20MB – as I understand it.


Now check your settings and kick back…


‘ Now check your config the “*maxmessageattachsize” variables- you should see your new max sizes replaced with what you programmed.


‘ Good luck!


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s