-->

Thursday, January 16, 2014

Exchange 2010 Hide Disabled User Mailboxes in Bulk

A common practice is to hide Disabled User Mailboxes in the GAL, so other users won't try to send messages to them.
The problem is: some admins forget to hide them and after a while the Disabled Mailboxes tend to stack up.

Its pretty easy to hide a bunch of Disabled Mailboxes all at once with PowerShell!

Hide Users From the GAL

Fire up the Exchange Management Shell and run:

Get-mailbox -ResultSize unlimited -OrganizationalUnit “domain.com/Users/ Disabled Users” | set-mailbox -HiddenFromAddressListsEnabled $True

**Note** Change domain.com/Users/Disabled Users to the OU Path where your disabled users live.

Set Delivery Restrictions on Disabled Mailboxes

Another thing I like to do is set the Disabled Mailboxes to Require Senders to be Authenticated, which will bounce messages from outside your organization. This is because even disabled Mailboxes will still receive messages until they are completely removed.

In the EMS, run:

Get-mailbox -ResultSize unlimited -OrganizationalUnit “domain.com/Users/ Disabled Users” | set-mailbox -RequireSenderAuthenticationEnabled $true

**Note** Again, change domain.com/Users/Disabled Users to the OU Path where you store your disabled users.

You can also use ADModify which you can find in my Next Post, to modify Delivery Restrictions through a GUI interface.

Now your disabled mailboxes should be hidden and not filling up.

No comments:

Post a Comment