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

Anderson Patricio is a Canadian MVP in Cloud and Datacenter Management, and Office Server and Services, besides the Microsoft Award he also holds a Solutions Master (MCSM) in Exchange and several other certifications. Anderson has been contributing to the Microsoft Community with articles, tutorials, blog posts, twitter, forums and book reviews. He is a regular contributor here at,, and Anderson (Portuguese).