The following snippet provides a way to increase the maximum receive sizelimit on a specific mailbox.

This commonly requires adjustment during an email migration where the source mailbox has items larger than the target mailbox can receive

Note that this snippet depends upon the Exchange Online PowerShell module.


Import-Module ExchangeOnlineManagement

$sessions = Get-PSSession | Select-Object -Property State, Name
$isConnected = (@($sessions) -like '@{State=Opened; Name=ExchangeOnlineInternalSession*').Count -gt 0
    If ($isConnected -ne $True) {
        Get-PSSession | Remove-PSSession
        Connect-ExchangeOnline | Out-Null

Set-Mailbox -Identity <Identity> -MaxReceiveSize 150MB