Skip to Main Content
Active Directory, 3rd Edition
book

Active Directory, 3rd Edition

by Joe Richards, Robbie Allen, Alistair G. Lowe-Norris
January 2006
Beginner content levelBeginner
832 pages
27h 52m
English
O'Reilly Media, Inc.
Content preview from Active Directory, 3rd Edition

Viewing All Store Details of All Mailboxes on a Server

The following code takes all of the properties from Table 24-2 and displays them for all mailboxes on a specified server:

 ' This code enumerates all store details about all mailboxes ' on a single specified server Option Explicit Dim strComputer, objWMI, objMbxs, objMbx ' ------ SCRIPT CONFIGURATION ------ strComputer = "<Exchange Server>" 'e.g. ExchServer2 ' ------ END CONFIGURATION --------- Set objWMI = GetObject("winmgmts:\\" & strComputer & _ "\root\MicrosoftExchangeV2") Set objMbxs = objWMI.ExecQuery("Select * from Exchange_Mailbox",,48) For Each objMbx In objMbxs WScript.Echo "LegacyDN: " _ & objMbx.LegacyDN WScript.Echo "MailBoxGUID: " _ & objMbx.MailboxGUID WScript.Echo "ServerName: " _ & objMbx.ServerName WScript.Echo "StorageGroupName: " _ & objMbx.StorageGroupName WScript.Echo "StoreName: " _ & objMbx.StoreName WScript.Echo "AssocContentCount: " _ & objMbx.AssocContentCount WScript.Echo "DateDiscoveredAbsentInDS: " _ & objMbx.DateDiscoveredAbsentInDS WScript.Echo "DeletedMessageSizeExtended: " _ & objMbx.DeletedMessageSizeExtended WScript.Echo "LastLoggedOnUserAccount: " _ & objMbx.LastLoggedOnUserAccount WScript.Echo "LastLogoffTime: " _ & objMbx.LastLogoffTime WScript.Echo "LastLogonTime: " _ & objMbx.LastLogonTime WScript.Echo "Size: " _ & objMbx.Size WScript.Echo "StorageLimitInfo: " _ & objMbx.StorageLimitInfo WScript.Echo "TotalItems: " _ & objMbx.TotalItems WScript.Echo "" WScript.Echo "" Next WScript.Echo ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Active Directory, 4th Edition

Active Directory, 4th Edition

Brian Desmond, Joe Richards, Robbie Allen, Alistair G. Lowe-Norris
Active Directory, Second Edition

Active Directory, Second Edition

Robbie Allen, Alistair G. Lowe-Norris

Publisher Resources

ISBN: 0596101732Supplemental ContentErrata Page