Solved

Deleting Disconnected Mailboxes

Posted on 2008-06-17
2
374 Views
Last Modified: 2010-03-06
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}


0
Comment
Question by:oveloz
2 Comments
 
LVL 6

Accepted Solution

by:
DocCan11 earned 500 total points
ID: 21803402
you will have to change the "server\database" to your server and the mailbox database you want it to work against.. that info is then fed into the where-object clause to check and see if the attribute disconnectdate is not null (meaning it has been deleted) the $_ in front of it is there as a sort of current record idea since many could be passed into it..
0
 

Author Comment

by:oveloz
ID: 21825210
Thanks!
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
MS Outlook is a world-class email client application that is mainly used for e-communication globally.  In this article, we will discuss the basic idea about MS Outlook, its advanced features, and types of MS Outlook File formats.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question