Solved

Deleting Disconnected Mailboxes

Posted on 2008-06-17
2
371 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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Check out this infographic on what you need to make a good email signature that will work perfectly for your organization.
Follow this checklist to learn more about the 15 things you should never include in an email signature from personal quotes, animated gifs and out-of-date marketing content.
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now