tag:blogger.com,1999:blog-261470339069403116.post8432276512418427792..comments2023-06-13T15:01:09.582+01:00Comments on get-scripting: Exchange 2003, WMI and Powershell - Part 4 (Disconnected Mailboxes)Jonathan Meddhttp://www.blogger.com/profile/16003000142799678177noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-261470339069403116.post-40526520946972863192008-08-12T13:56:00.000+01:002008-08-12T13:56:00.000+01:00Brilliant! Thanks so much for checking out the pos...Brilliant! Thanks so much for checking out the post and providing the improved ways to do this.Jonathan Meddhttps://www.blogger.com/profile/16003000142799678177noreply@blogger.comtag:blogger.com,1999:blog-261470339069403116.post-89795135819462722152008-08-08T16:56:00.000+01:002008-08-08T16:56:00.000+01:00As far as I know, if DateDiscoveredAbsentInDS has ...As far as I know, if DateDiscoveredAbsentInDS has a value then the mailbox is considered disconnected.<BR/><BR/>Filtering with where-object is performed AFTER you get all mailbox objects to your console, which can be quiet expensive to do. To boost performance you can use the -filter parameter which make your query run on the server and return only the relevant mailbox objects:<BR/> <BR/>Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer ExchangeServerName -filter "DateDiscoveredAbsentInDS is not null" | sort MailboxDisplayName | ft MailboxDisplayName,ServerName,StorageGroupName,StoreName,Size <BR/><BR/><BR/>Or even select only the properties you want using a query:<BR/><BR/>$query = "Select MailboxDisplayName,ServerName,StorageGroupName,StoreName,Size From Exchange_Mailbox Where DateDiscoveredAbsentInDS is not null"<BR/>Get-Wmiobject -namespace root\MicrosoftExchangeV2 -computer ExchangeServerName -query $query | sort MailboxDisplayName | ft MailboxDisplayName,ServerName,StorageGroupName,StoreName,Size<BR/><BR/><BR/>---<BR/>Shay Levy<BR/>http://blogs.microsoft.co.il/blogs/ScriptFanaticShay Levyhttps://www.blogger.com/profile/14910279001063843963noreply@blogger.com