Link to home
Start Free TrialLog in
Avatar of oveloz
ovelozFlag for United States of America

asked on

Deleting Disconnected Mailboxes

I have been trying to figure out how to manually delete mailboxes that are in the ESM under Recipient Configuration / Disconnected Mailboxes.  This is not like Exchange 2003 where you just purge.  I have found the following script in a newsgroup posting, and wonder if it will work.  Looks like it queries to see if and what mailboxes are disconnected then it deletes all it finds?  Anyhow, I don't understand the syntax completely, because I am assumin I need to input some sort of info specific to my situation for it to work?  Basically, I want to delete disconnected mailboxes.


Get-MailboxStatistics -database "server\database" | where
{$_.disconnectdate -ne $null} | foreach {Remove-mailbox -database
$_.database -storemailboxidentity $_.mailboxguid}


ASKER CERTIFIED SOLUTION
Avatar of DocCan11
DocCan11

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of oveloz

ASKER

Thanks!