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

Dumping All Store Details of All Mailboxes on All Servers in Exchange Org

The following code takes the preceding script and extends it by extracting all information from all Exchange servers and dumping it to a text file in semi-colon delimited format:

    'This script dumps all store details of all mailboxes in an
    'Exchange ORG to a text file in semi-colon delimited format
    Option Explicit
    Dim objConn, objComm, objRS
    Dim strBase, strFilter, strAttrs, strScope
    Dim fso, outfile
    Dim strComputer, objWMI, objMbx, objMbxs
    ' ------ SCRIPT CONFIGURATION ------
    strConfigDN = "<Exchange Server>" 'e.g. cn=configuration,dc=mycorp,dc=com ' ------ END CONFIGURATION --------- '********************************************************************** 'Set the ADO search criteria '********************************************************************** strBase = "<LDAP:// " & strConfigDN & ">;" strFilter = "(objectcategory=msExchExchangeServer);" strAttrs = "name;" strScope = "Subtree" set objConn = CreateObject("ADODB.Connection") objConn.Provider = "ADsDSOObject" objConn.Open '********************************************************************** 'Need to enable Paging in case there are more than 1000 objects returned '********************************************************************** Set objComm = CreateObject("ADODB.Command") Set objComm.ActiveConnection = objConn objComm.CommandText = strBase & strFilter & strAttrs & strScope objComm.Properties("Page Size") = 1000 Set objRS = objComm.Execute( ...
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