Apply Settings to all users in specific Exchange Database

Let’s say you want to apply some settings to all users in a specific exchange database, you don’t want to apply that to each individual mailbox especially if there are a lot of mailboxes in the database.

For e.g. You would want to disable MAPI for all users in Test_db database. You can run the following commands.

Whatif switch tells you what the command is going to do so it’s better to run what if switch before just to be on safe side so you know which users it’s going to affect. After confirming, you can remove whatif switch and execute the command.

$Mailboxes = (get-mailbox -database Test_db).distinguishedname

foreach ($m in $Mailboxes)

{ set-casmailbox -identity $m -mapihttpenabled $false -whatif}

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Create a website or blog at WordPress.com

Up ↑