Returns mailbox information for a computer running Microsoft Exchange Server 2003
On Error Resume NextstrComputer = "."Set objWMIService = GetObject("winmgmts:" _& "{impersonationLevel=impersonate}!\\" & strComputer & _"\ROOT\MicrosoftExchangeV2")Set colItems = objWMIService.ExecQuery _("Select * from Exchange_Mailbox")For Each objItem in colItemsWscript.Echo "Associated content count: " & _objItem.AssocContentCountWscript.Echo "Date discovered absent in directory service: " & _objItem.DateDiscoveredAbsentInDSWscript.Echo "Delete messages size extended: " & _objItem.DeletedMessageSizeExtendedWscript.Echo "Last logged-on user account: " & _objItem.LastLoggedOnUserAccountWscript.Echo "Last logoff time: " & objItem.LastLogoffTimeWscript.Echo "Last logon time: " & objItem.LastLogonTimeWscript.Echo "Legacy distinguished name: " & objItem.LegacyDNWscript.Echo "Mailbox display name: " & _objItem.MailboxDisplayNameWscript.Echo "Mailbox GUID: " & objItem.MailboxGUIDWscript.Echo "Server name: " & objItem.ServerNameWscript.Echo "Size: " & objItem.SizeWscript.Echo "Storage group name: " & _objItem.StorageGroupNameWscript.Echo "Storage limit information: " & _objItem.StorageLimitInfoWscript.Echo "Store name: " & objItem.StoreNameWscript.Echo "Total items: " & objItem.TotalItemsWscript.EchoNext
This is a VB Script, this can be used by saving the file in .vbs file