locked
Unused mailboxes on Exchange 2003 RRS feed

  • Question

  • Hi all,

    is there any way how to get a script which will give me mailboxes to which has nobody logged on for some time on particular Exchange 2003 server?

    I have performed this on Exchange 2007 using get-mailboxstatistics cmdlet but on Exchange 2003 I don't know.

    Please, can anyone help?

    Friday, May 4, 2012 2:06 PM

Answers

All replies

  • In Exchange 2003 you can get the information using WMI and the Exchange_Logon Class see http://msdn.microsoft.com/en-us/library/aa143724(v=exchg.65).aspx which also has a script.  If Logon Times don't work for you the other thing you can use is unread and Sent messages via CDO 1.2 http://gsexdev.blogspot.com.au/2004/06/finding-unused-mailboxes-with-cdo-12.html (this will however update the last logon time).

    Cheers
    Glen

    • Marked as answer by Jan Bilek Friday, May 18, 2012 9:46 AM
    Monday, May 7, 2012 5:16 AM
  • Thank you very much for your response,

    I have tried to use Exchange_Logon Class but I get all logons including public folders etc which I am not interested in.

    What I have tried next is following:

    strServer = "MYEXCHANGESERVER"
    Const MinimalSize = 0 'size in MB
    Set objWMIExchange = GetObject("winmgmts:{impersonationLevel=impersonate}!//" & strServer & "/root/MicrosoftExchangeV2")
    Set colExchangeMailboxes = objWMIExchange.InstancesOf("Exchange_Mailbox")
    For Each objExchangeMailbox in colExchangeMailboxes
        If (Left(objExchangeMailbox.StorageGroupName, 5) <> "Recov") And (Round(objExchangeMailbox.Size/1024,0) > MinimalSize) Then
    		Wscript.Echo objExchangeMailbox.MailboxDisplayName & " ; " &_
    			Round(objExchangeMailbox.Size/1024,0) & " MB"
    	End If
    Next
    Set colExchange_Mailboxes = Nothing
    Set objWMIExchange = Nothing

    This will give me a nice list of mailboxes on server with rounded size to MBs. How can I make it to give me a list of mailboxes with "objExchange_Logon.LogonTime" older then one month?

    Thank you very much

    Jan

    Tuesday, May 15, 2012 9:10 AM