Solved

getting an output erron when running the following command in PS

Posted on 2013-12-17
6
1,872 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 39724797
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
ID: 39724803
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
ID: 39724829
0
Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
LVL 15

Expert Comment

by:WalkaboutTigger
ID: 39724832
Usually it is in

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

Author Comment

by:SEHC
ID: 39724834
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
ID: 39726391
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

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows 10 came with  a lot of built in applications, Some organisations leave them there, some will control them using GPO's. This Article is useful for those who do not want to have any applications in their image (example:me).
Previously, on our Nano Server Deployment series, we've created a new nano server image and deployed it on a physical server in part 2. Now we will go through configuration.
This video discusses moving either the default database or any database to a new volume.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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