Query to find specific mailboxes
HiI need to find both disabled AD accounts whichstill have mailboxes and also mailboxes which don't have associated AD accounts.Is there a script or LDAP query which can be used to find these ?I need to find out how much free space may be freed up by removing all the mailboxes of deleted accounts and mailboxes which may still be on the system but don't have associated accounts any more.Thanks
October 27th, 2009 2:35pm

There is a script to find the disable account http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24263066.htmlFor disconneceted mail boxes http://loguinfo.blogspot.com/2009/08/to-find-disconnected-mailbox-in-mailbox.htmlRaj
Free Windows Admin Tool Kit Click here and download it now
October 27th, 2009 3:02pm

Here you Go http://msexchangetips.blogspot.com/2007/06/exchange-find-disabled-accounts-with.html You can look in below gallery to look for script to find out whitespace in database http://gallery.technet.microsoft.com/ScriptCenter/en-us/441e4e39-30d0-405a-905d-81ed35702169Vinod |CCNA|MCSE 2003 +Messaging|MCTS|ITIL V3|
October 27th, 2009 3:35pm

HiGuys - thanks for your responses.Another question - is there any way to get the sizes of the disabled account mailboxes without checking for each individual mailbox in Exchange system manager ?This is for Exchange 2003. I realise there's probably a powershell command for 2007.Thanks
Free Windows Admin Tool Kit Click here and download it now
November 1st, 2009 10:10pm

I think yes. Sort out the mail boxes in ESM, run the clean up agent and get all the red crossed ones and then calculate the size of the mail boxes.Raj
November 1st, 2009 10:43pm

HiSorry - I meant get the sizes of mailboxes for disabled AD accounts - but the mailboxes are still assigned to the users. So they show still show up in ESM as normal mailboxes but they are listed in amongst all the other mailboxes.I've got an LDAP query to input into ADUC which lists all the disabled users still with mailboxes but it doesn't list the mailbox sizes in ADUC. Just to see how much space might be freed up by deleting the users permanently rather than leaving them disabled.Thanks
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2009 1:04pm

Please refer the post in this thread to export the disabled users, and then use the cmdlet below to query the mailbox size Import-csv C:\List.csv | Foreach {Get-MailBoxStatistics -Identity $_.Disableuser | Sort-Object -Descending "totalitemsize"| ft displayname,@{expression={$_.totalitemsize.value.ToKB()};width=20;label="Mailbox Size(kb)"},ItemCount -wrap}
November 4th, 2009 4:49am

Thanks for the reply.Sorry but as I said in a previous response this is for Exchange 2003, not 2007Regards
Free Windows Admin Tool Kit Click here and download it now
November 4th, 2009 12:41pm

Apologize for missing the version Per my research, theres no method to query disabled mailbox size in the exchange 2003 natively. You can do it programmatically, for the question about script please use Development forum which would be the best place for the problem How to programmatically get the size of mailboxes in Exchange Exchange_Mailbox Class
November 5th, 2009 6:40am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics