Changing more than 1000 mailboxes at the same time through Exchange Management Shell

Share this:

Hello folks,

If you need to run a cmdlet that changes one or more attribute of more than 1000 users you will receive an error if you try this following cmdlet:

Get-Mailbox | Set-Mailbox -RulesQuota:256KB

In this specific case we have to use ResultSize parameter in the Get-Mailbox cmdlet to list all your users and then they will be changed by the second cmdlet in the same pipe, as follows:

Get-Mailbox -ResultSize:5000 | Set-Mailbox -RulesQuota:256KB

Note: In this case my result size does not go over 5000 mailboxes. You have to change this value based in your number of mailbxes.

Note #2: There is also the value unlimited for the ResultSize switch which means that you can use -ResultSize unlimited and you don’t need to care to add a number higher than your current users because it will get all users no matter how many users you have.


Anderson Patricio

Written by Anderson Patricio

Anderson Patricio is a Canadian Exchange Server MVP and MCSM (Solutions Master) and he contributes to the Microsoft Community with articles, tutorials, blog posts, forums and book reviews. He is a regular contributor at, and (Portuguese).