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

https://community.spiceworks.com/how_to/65562-office365-setting-maximum-mail-transport-limits-email-attachments

 

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

Introduction

** 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:

https://technet.microsoft.com/en-us/library/exchange-online-limits.aspx#TransportRuleLimits
** 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)

1

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.

2

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

3

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

4

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 🙂

5

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

6

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 https://ps.outlook.com/powershell -Credential $LiveCred -Authentication Basic –AllowRedirection

Import-PSSession $Session

7

Let’s see what our values are here…

Get-TransportConfig

8

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.

9

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

10

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.

11

Now check your settings and kick back…

Get-TransportConfig

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

Conclusion

‘ Good luck!

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s