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
 FullAccess
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
Ali-Raza111Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

AlanConsultantCommented:
Hi,

I think you need to breakdown the mailboxes into smaller 'chunks'.

For example, do all the mailboxes starting with each letter separately with a script like this:

Get-Mailbox -Identity A* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity B* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity C* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity D* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity E* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity F* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity G* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity H* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity I* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity J* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity K* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity L* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity M* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity N* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity O* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity P* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity Q* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity R* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity S* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity T* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity U* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity V* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity W* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity X* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity Y* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess
Get-Mailbox -Identity Z* | Add-MailboxPermission -User "SVC_Account" -AccessRights FullAccess

Open in new window


We could do it with a loop too, but the above is simple.

Alan.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ali-Raza111Author Commented:
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
0
AlanConsultantCommented:
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 :-)

Alan.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Exchange

From novice to tech pro — start learning today.