Link to home
Start Free TrialLog in
Avatar of Ali Raza
Ali RazaFlag for United States of America

asked on

Assigning full access permission to backup service account failing..

Hi All,

I'm trying to assigned full permission access to backup service account to restore any account but failing due to remote client exceeded the allowed maximum any thoughts on below error!

[PS] C:\Windows\system32>Get-Mailbox -ResultSize Unlimited | Add-MailboxPermission -User "SVC_Account" -AccessRights
Sending data to a remote command failed with the following error message: [ClientAccessServer=Exchange2013.local,BackEndServer
=Exchange2013.local,RequestId=4a7a1c5d-37bd-488c-b446-3f69d5843040,TimeStamp=11/9/2017 11:01:49 PM]
[FailureCategory=WSMan-Others] The total data received from the remote client exceeded the allowed maximum. The
allowed maximum is 524288000. For more information, see the about_Remote_Troubleshooting Help topic.
    + CategoryInfo          : OperationStopped: (Exchange2013.local:String) [], PSRemotingTransportException
    + FullyQualifiedErrorId : JobFailure
    + PSComputerName        : Exchange2013.local
Avatar of Alan
Flag of New Zealand image

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


Thanks Alan,

I was checking same thing for my script too which pulls all the users in the organization. For assigning full permission your suggested solutions worked.

Below is the script, i'm using to pull all the mailbox users and export into PST.

get-mailbox -resultsize unlimited -erroraction silentlycontinue | Get-MailboxStatistics | select-object *,@{name="TotalItemSizeinMB";expression={[math]::Round($_.totalitemsize.value.ToBytes() / 1MB,2)}},@{name="TotalDeletedItemSizeinMB";expression={[math]::Round($_.totaldeleteditemsize.value.ToBytes() / 1MB,2)}},@{name="CombinedTotalSizeinMB";expression={[math]::Round($_.totalitemsize.value.ToBytes() / 1MB,2) + [math]::Round($_.totaldeleteditemsize.value.ToBytes() / 1MB,2)}},@{name=“SourceDatabase”;expression={$_.Database}} | sort-object combinedtotalsizeinMB -Descending | select displayname, *GUID*, *MB,ItemCount, DeletedItemCount, LastLogonTime,SourceDatabase | export-csv -force -notype C:\Temp\test.csv
Bit hard to read, but is that all one line / command?  If so, well played Sir!

Without pulling it apart and trying it myself, if you want to just export all the mailboxes, there are easier (shorter!) ways, but if it works, it works :-)