Avatar of Newguy 123
Newguy 123
 asked on

removing exchange 2010 mailbox

Hello Experts.

I seem to be in a pickle here. I deleted a users AD account, after i tried to remove his mailbox from Exchange 2010, it gave error message that it could not locate desired user in AD. I now know i should've removed his mailbox first before deleting his AD accout. Is there a way of forcing exchange 2010 to remove a mailbox in this case. Please let me know.
ExchangeActive DirectoryEmail Servers

Avatar of undefined
Last Comment
Mre Martin

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
TechieMD

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
M A

Hi,
Please run the below command on the database where this user mailbox exists
Clean-MailboxDatabase <database1>

Open in new window

If you dont know the database name run this
Get-mailboxdatabase | Clean-MailboxDatabase

Open in new window

After this you can see the mailbox as disconnected

Thanks
MAS
Mre Martin

Listing all disconnect mailbox;

Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid

Removing :

Remove-Mailbox -Database <Database-Name> -StoreMailboxIdentity <MailboxGuid> -confirm:$false

Remove all:

$users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23