{"id":275,"date":"2014-07-07T10:08:07","date_gmt":"2014-07-07T08:08:07","guid":{"rendered":"http:\/\/exchangetimes.net\/?p=275"},"modified":"2014-07-07T10:08:07","modified_gmt":"2014-07-07T08:08:07","slug":"deleting-disconnected-mailboxes-in-exchange-2007","status":"publish","type":"post","link":"https:\/\/exchangetimes.net\/?p=275","title":{"rendered":"Deleting disconnected Mailboxes in Exchange 2007"},"content":{"rendered":"<p>Purging disconnected mailboxes in Exchange 2003 was quick and easy.<\/p>\n<p>With Exchange 2007 you need to use the Exchange Management Shell to purge\/delete the disconnected mailboxes. Below are some examples on how to delete disconnected mailboxes in Exchange 2007. Make sure that you need to delete the disconnected mailboxes as it&#8217;s easier to reconnect a disconnected mailbox if a user account and mailbox got deleted by accident.<\/p>\n<p><strong>Delete a specific disconnected mailbox:<\/strong><\/p>\n<p>1. Get-MailboxDatabase (this will show you\u00a0 the database names)<br \/>\n2. Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid (view the user&#8217;s GUID here)<br \/>\n3.\u00a0 Remove-Mailbox -Database\u00a0<span style=\"color: #ff0000;\"><span style=\"color: #000000;\">&#8220;<\/span>Type Your Database Name Here<span style=\"color: #000000;\">&#8220;<\/span><\/span>\u00a0-StoreMailboxIdentity\u00a0<span style=\"color: #ff0000;\">Type the Users Mailbox GUID Here<\/span>\u00a0-confirm:$false<\/p>\n<p><strong>Delete all disconnected mailboxes from a specific database:<\/strong><\/p>\n<p>First create a variable $users as per point 1<\/p>\n<p>1. $users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid<br \/>\n2. $users | ForEach { Remove-Mailbox -Database &#8220;<span style=\"color: #ff0000;\">Type Your Database Name Here<\/span>&#8221; -StoreMailboxIdentity $_.MailboxGuid -confirm:$false }<\/p>\n<p>All the disconnected mailboxes in the specific database will now be deleted.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Purging disconnected mailboxes in Exchange 2003 was quick and easy. With Exchange 2007 you need to use the Exchange Management Shell to purge\/delete the disconnected mailboxes. Below are some examples on how to delete disconnected mailboxes in Exchange 2007. Make sure that you need to delete the disconnected mailboxes as it&#8217;s easier to reconnect a disconnected mailbox if a user account and mailbox got deleted by accident. Delete a specific disconnected mailbox: 1. Get-MailboxDatabase (this will show you\u00a0 the database names) 2. Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid (view the user&#8217;s GUID here) 3.\u00a0 Remove-Mailbox -Database\u00a0&#8220;Type Your Database Name Here&#8220;\u00a0-StoreMailboxIdentity\u00a0Type the Users Mailbox GUID Here\u00a0-confirm:$false Delete all disconnected mailboxes from a specific database: First create a variable $users as per point 1 1. $users = Get-MailboxStatistics | where-object { $_.DisconnectDate -ne $null } | Select DisplayName,MailboxGuid 2. $users | ForEach { Remove-Mailbox -Database &#8220;Type Your Database Name Here&#8221; -StoreMailboxIdentity $_.MailboxGuid -confirm:$false } All the disconnected mailboxes in the specific database will now be deleted.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[29,205,7],"tags":[211,212],"class_list":["post-275","post","type-post","status-publish","format-standard","hentry","category-exchange-2007","category-exchange-management-shell","category-microsoft-exchange","tag-deleting-disconnected-mailboxes-in-exchange-2007","tag-purge-disconnected-mailboxes-in-exchange-2007"],"_links":{"self":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/275","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":1,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/exchangetimes.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}