Some Organizations requires retaining emails for employees who left on the production Exchange mailbox database .to get the benefits of exchange HA and Exchange Audit.
So they can disable user account and keep mailbox in the mailbox database.
However, even if you disable user account associated with that mailbox, you need to address the following:
1- Email address will be still viewable in GAL and address book and
2- Mailbox will continue receiving emails.
I have written this script will do the following:
- First, This script assuming user accounts are already disabled .by any AD tool.
- Then, It will verify all exchange attributes for the user account will are updated.(Set-Mailbox -ApplyMandatoryProperties)
- It will exclude all discovery mailboxes and Shared mailboxes
- for each mailbox , it will:
- hide email from GAL , Address book.
- restrict mailbox receiving emails accept only from dummy user