Solved

getting an output erron when running the following command in PS

Posted on 2013-12-17
6
1,840 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
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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Problems using Powershell and Active Directory?

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

Question has a verified solution.

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

Lotus Notes – formerly IBM Notes – is an email client application, while IBM Domino (earlier Lotus Domino) is an email server. The client possesses a set of features that are even more advanced as compared to that of Outlook. Likewise, IBM Domino is…
The following article is intended as a guide to using PowerShell as a more versatile and reliable form of application detection in SCCM.
In this video we show how to create a Contact 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 Recipients >> Contact ta…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

856 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