Link to home
Start Free TrialLog in
Avatar of David C
David CFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Exchange powershell request too large

Hi Experts

I am trying to run the command below but getting an error that the request is too large

get-mailbox  | Add-MailboxPermission -User ”User” -AccessRights ‘FullAccess’

User generated image
Avatar of Scobber
Scobber
Flag of Australia image

Try batching by OU
get-mailbox -organizationalunit domain/users |  Add-MailboxPermission -User ”User” -AccessRights ‘FullAccess’

you can also modify the send receive sizes, but that will only work on remote sessions see:
https://www.experts-exchange.com/questions/28424605/Remote-client-exceeded-allowed-maximum.html
Avatar of David C

ASKER

I tried the command in an OU with 7 users and it works but wont work with 27. Could there be something else stopping this apart from what can be solved with the remote sessions?
$sales = Get-Mailbox
$sales | ForEach-Object{
  Add-MailboxPermission -identity $_ -User ”user” -AccessRights ‘FullAccess’
}

does that help?


**edited
Avatar of David C

ASKER

Its requesting an identity?

User generated image
ASKER CERTIFIED SOLUTION
Avatar of Scobber
Scobber
Flag of Australia image

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

Please use below command :

Get-Mailbox | Add-MailboxPermission -User <UserorGroupIdentity> -AccessRights Fullaccess -InheritanceType all

Let me know if this works for you.

Thanks,
Andy