This article will help you Increase the Email Attachment size on Office365 via PowerShell.

  • Login to Office 365 via Azure PowerShell. It’s advised to install the latest version of PowerShell. Prerequisite for Azure PowerShell is Microsoft Online Sign-in Assistant. You can download it from here.
  • You can download the Azure PowerShell from the links below:
  • Install the Sign-in Assistant, and Azure Active Directory Module, and launch Windows Azure PowerShell as Administrator (using Run as Administrator)
  • Run the following commands to connect with your Office 365 account:
    • Set-ExecutionPolicy = unrestricted
    • $cred = Get-Credential -Credential $user

    Enter the credentials for your Office 365 Admin account and hit OK.

    • Import-Module MSOnline
    •  Connect-MsolService -Credential $cred
    •  $msoExchangeURL = “
    •  $session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri $msoExchangeURL -Credential $cred -Authentication Basic -AllowRedirection
    •  Import-PSSession $session
  • Now you can check the current attachment limit using Get-TransportConfig command, however this command will provide you will a lot of info that you may not need. Hence run the following to filter the required results only:

Get-TransportConfig | FL *MaxMessage*

  • Here you’ll get the following results:


  • In above image, you can see how much data you can send in email as attachments to external and internal users. You can change this by running the following commands:

Set-TransportConfig -ExternalDsnMaxMessageAttachSize xxMB

Set-TransportConfig -InternalDsnMaxMessageAttachSize xxMB

Note: Here, replace the xx with the about of data you would like to allow (as shown in the image).

Set Attachment Size

  • Repeat this steps for both Internal and External values.

You can check the config again to see the new value is in place for both the commands.


The following two tabs change content below.
Passionate for Latest Gadgets, a Computer geek by Hobby, and luckily Profession too. Started my career in 2005 with IBM, worked with Microsoft later. Back in 2009, started Pledge Technologies ( (parent company to Grishbi). We, at Pledge Technologies, provide IT Consulting to SMBs across US & UK. Specialized in Microsoft Technologies like AD, Exchange, etc., and lot of experience of Office 365 Migration for various clients. Grishbi is a platform where we express what we learned today, and share it with world.
%d bloggers like this: