Link to home
Start Free TrialLog in
Avatar of Michael Leonard
Michael LeonardFlag for United States of America

asked on

need assistance with a powershell script to export out "online archive" mailbox sizes

hello, we are running into an error when trying to export out a size report on all online archive mailboxes:

error:
Sending data to a remote command failed with the following error message: The total data received from the remote clien
t exceeded allowed maximum. Allowed maximum is 524288000. For more information, see the about_Remote_Troubleshooting He
lp topic.

Open in new window


here is the script we are running:
Get-Mailbox -Archive -ResultSize Unlimited | Get-MailboxStatistics -Archive | Select DisplayName,StorageLimitStatus,@{name="TotalItemSize (MB)";expression={[math]::Round((($_.TotalItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},@{name="TotalDeletedItemSize (MB)";expression={[math]::Round((($_.TotalDeletedItemSize.Value.ToString()).Split("(")[1].Split(" ")[0].Replace(",","")/1MB),2)}},ItemCount,DeletedItemCount | Sort "TotalItemSize (MB)" -Descending | Export-Csv "C:\All Archive Mailboxes.csv" -NoTypeInformation

Open in new window



many thanks,

S.
Avatar of DarkTemplore
DarkTemplore
Flag of United States of America image

I believe you'll have to set the max received data setting for the session:
http://technet.microsoft.com/en-us/library/hh849726.aspx
Avatar of Lucian Constantin
One other suggestion is like one from this article: Exchange Massive Search and Destroy & Quota control.

Basically you could limit the Get-Mailbox command to Databse or Server using resepctive parameters, or avoid pipelining by creating a loop (see an example in the above article).
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Michael Leonard

ASKER

worked perfect! thank you Subsun