Hide AD disabled users from the Exchange Gallery

by | Jul 15, 2015 | 0 comments

If you are trying to clean up your exchange gallery by removing those users you have disabled but not deleted. As a policy I always keep the mailbox around for a month (space allowed, of course) or so if management needs certain emails or anything else.

Here’s a great command to use in EMS. Confirmed working in Exchange 2010 and 2013:

What I recommend is that you run the first part of the command first to verify the list of user accounts is what you expect:

If everything looks good go ahead and run the full command.