$(Get-MailboxStatistics -Database "ABCD") | where
{$_.DisconnectReason -eq "disabled"} | foreach {Remove-StoreMailbox
-Database $_.database -Identity $_.mailboxguid -MailboxState disabled }
above command prompts for the following:ConfirmAre you sure you want to perform this action?Removing mailbox "c14b0712-ba6e-32db-34e8-4543549b" on database "ABCD".[Y] Yes [A] Yes to All [N] No [L] No to All [?] Help (default is "Y"):Pressing Y removes one mailbox at a time; whereas pressing
↧