Solved

getting an output erron when running the following command in PS

Posted on 2013-12-17
6
1,750 Views
Last Modified: 2014-02-19
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
Comment
Question by:SEHC
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:WalkaboutTigger
Comment Utility
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
 
LVL 4

Author Comment

by:SEHC
Comment Utility
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
 
LVL 4

Author Comment

by:SEHC
Comment Utility
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 15

Expert Comment

by:WalkaboutTigger
Comment Utility
Usually it is in

C:\Program Files\Microsoft\Exchange Server\V14\ClientAccess\ecp\web.config
0
 
LVL 4

Author Comment

by:SEHC
Comment Utility
thanks let me take a look at that and I will let you knwo if it worked
0
 
LVL 40

Accepted Solution

by:
Subsun earned 500 total points
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Exchange server is not supported in any cloud-hosted platform (other than Azure with Azure Premium Storage).
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
how to add IIS SMTP to handle application/Scanner relays into office 365.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now