Powershell Script to query mailboxes
G'day all! I am after a Powershell script (Exchange 2003) that will deliver a list of mailboxes (piped to a file) from certain servers (server names all start with a fixed set of characters, e.g. "XYZ") where the last logon time is prior to a certain date. The list needs to include the name of the mailbox, the owner(s) and the last logon time.
August 14th, 2011 12:30am

Since i dont have Exchange 2003 server handy, i could not get you the exact command, however i could give you an powershell script which will export the mailboxes from Exchange 2003 server to CSV file. Try to user -filter/ or "Where" command and filter the mailboxes as your requirement ################################################################################################ $day = Get-Date -UFormat "%Y%m%d" # Gets data through WMI from specified Exchange mailbox servers $computers = "server1","server2","Server3" foreach ($computer in $computers) { Get-Wmiobject -namespace root\MicrosoftExchangeV2 -class Exchange_Mailbox -computer $computer | sort-object -desc LastLogonTime | select-object MailboxDisplayName,StorageGroupName,StoreName,Size,LastLogonTime | Export-Csv -Path $computer-$day.csv } #################################################################################>>:::.... if you find it useful, mark this as answer ...:::<< Thanks & Regards, Sandheep [...:::""I can't do it" never yet accomplished anything; "I will try" has performed wonders ":::...]
Free Windows Admin Tool Kit Click here and download it now
August 14th, 2011 12:58am

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

Other recent topics Other recent topics