First you need to get a list of all the disconnected mailboxes – Get-MailboxStatistics -Database “” | Where-Object {$_.DisconnectDate -Notlike $NULL} | FL DisplayName, DisconnectDate, MailboxGuid
Next step is to take the GUID of the account you want to delete and use this command – Remove-Mailbox -Database “” -StoreMailboxIdentity