January 2006
Beginner
832 pages
27h 52m
English
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( ...