Can you delete a mailbox immediately without removing the user from the AD?
Yes, and you don’t have to wait for Exchange to do it.
Read the instructions with PowerShell.
Lately, the import of several PST did not work as planned.
The ideas was to empty the mailbox and repeat the import.
And that leads to the questions:
How to delete the mailbox without removing the user from the AD?
And moreover, how to do it without waiting for Exchange to remove it itself?
– Yes, with PowerShell!
Delete mailbox immediately – step by step
- Run the Exchange Management Shell with administrator permissions.
- Deactivate the mailbox you want to delete:
Disable-mailbox: john@somecompany.com
Unfortunately you cannot delete the mailbox immediately with the console.
But you can do it with the Shell.
- Select the GUID of the deleted mailbox:
Get-MailboxDatabase | Get-MailboxStatistics | Where{ $_.DisconnectDate -ne $null } |fl DisplayName, Database, Identity, DisconnectReason
The GUID looks like this: “eb5a492b-55e7-47e2-817e-a233e2e79e95“.
-
Copy it because you will need it for the next step.
-
Delete the mailbox
Remove-StoreMailbox -Database “SampleDB” -Identity “eb5a492b-55e7-47e2-817e-a233e2e79e95“ -MailboxState “Disabled”
Now the mailbox is deleted finally and we can set it up a new one:
Enable-Mailbox -Identity Domain\John.Somecompany -Database SampleDB
Leave a Reply
<p>Your email is safe with us.<br/>Information about our <a href="https://activedirectoryfaq.com/contact-us/">data protection policies</a></p>