Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2138
  • Last Modified:

getting an output erron when running the following command in PS

Script

Get-Mailbox -ResultSize unlimited | Get-MailboxStatistics | Sort -Property TotalItemsize -Descending | Format-Table DisplayName, StorageLimitStatus, TotalDeletedItemSize, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”} > c:\Exchangereports\emailreport.CSV


Error

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

    + CategoryInfo          : OperationStopped: (system.Manageme...pressionSyncJob:PSInvokeExpressionSyncJob) [], PSRe
   motingTransportException
    + FullyQualifiedErrorId : JobFailure




Dose anyone knwo how to fix this error or is there a different command I cna use to get the informaiton?


Exchange server information

Exchange 2010 sp3 ru2
0
SEHC
Asked:
SEHC
  • 3
  • 2
1 Solution
 
WalkaboutTiggerCommented:
Powershell has a hard limit of 524,288,000 bytes returned from a query.
 
The value for the powershell limit is in web.config file.
 
To increase the limit, increase the value and then recycle the app pool or perform an iisreset.
 
In addition, The memory requirement can be reduced by limiting the query to 1000 mailboxes at a time using the where-object to filter those mailbox.
0
 
SEHCAuthor Commented:
Hi


where is the web.config file located because the one in the wwwroot does not have the information in there to be changed.

SEHC
0
 
SEHCAuthor Commented:
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
WalkaboutTiggerCommented:
Usually it is in

C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\ecp\web.config
0
 
SEHCAuthor Commented:
thanks let me take a look at that and I will let you knwo if it worked
0
 
SubsunCommented:
Try this script instead of doing all process in pipeline...
$mailboxs = Get-Mailbox -ResultSize unlimited
$(Foreach ($mailbox in $mailboxs){ 
 $mailbox | Get-MailboxStatistics |
  Select DisplayName, StorageLimitStatus, TotalDeletedItemSize, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}
})| Sort -Property "Size(MB)" -Descending | c:\Exchangereports\emailreport.CSV

Open in new window

0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now