Disable Email Accounts in Exchange

Deleting Mailbox in Exchange Admin Console will delete the attached AD objects!

Always great to find out afterwards – thank you Microsoft. :/

So….to just disable an account:

In the Exchange Management Console, right-click and select disable mailbox

or

in the Exchange Management PowerShell, use the Disable-Mailbox cmdlet:

Disable-Mailbox -Identity {mailboxname} -Confirm:$false

Disabling the mailbox will remove the Exchange attributes from the Active Directory object, which disconnects the mailbox and leaves the Active Directory object intact.

The user account will remain in Active Directory and disconnected mailbox will be purged after retention period passes.

You may also need to change a group’s ownership:

Type in the following command and replace “distribution group” with the actual group whose owner is changing.

[PS] >Set-DistributionGroup "distribution group" –ManagedBy "admin.serviceaccount@whomever.com" -BypassSecurityGroupManagerCheck

Leave a Reply

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