When you use the remote Exchange PowerShell command Get-Mailbox -ResultSize Unlimited to retrieve information about Exchange Online mailboxes in your organization, you receive an error message that resembles the following:
[ClientAccessServer=XXXXXXXXXCA014,BackEndServer=XXXXXXmb294.namprd05.prod.outlook.com,RequestId=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,TimeStamp=<Date><Time>] The data in the command exceeded the maximum permitted by the session configuration. The allowed maximum is 500MB. Change the input, use a different session configuration, or change the "PSMaximumReceivedObjectSizeMB" and "PSMaximumReceivedDataSizePerCommandMB" properties of the session configuration on the remote computer
This issue occurs when the process times out as it tries to retrieve a large volume of data in one session. This issue may occur when you try to retrieve mailbox information from a very large organization.
To work around this issue, run the command to execute on the server, and then add a pause between each command to prevent throttling.
Step 1: Retrieve the list of objects from the server
Use the Invoke-Command cmdlet to execute the commands from the server. For example: