|
Huntland Services Ltd Tel: +44 (0)1392-490518
|
Efficiently Querying of Multiple Domain Based Machines
|
|
| Back | ||
|
This script displays on screen or dumps to a text file the results of a semi-synchronous query for EventLog in formation to multiple machines in an Active Directory domain. Using WMI to connect to a large number of systems in order to query some information can be a challenge. There is a hard coded restriction imposed by DCOM that causes a timeout if a connection takes too long. However within that restriction it is possible to get the best possible performance from a script particularly where large amounts of data are being returned for subsequent processing. The strategy is to use a semi-synchronous query to achieve the best possible throughput. (See Using Synchronous, Asynchronous And Semi-synchronous Operations in WMI Scripts) To obtain a list of available systems in the domain you could use an ADSI connection to the Win2k Active Directory. However as WMI models the Active Directory in the root\LDAP namespace which is automatically built on an Active Directory domain controller, it provides a convenient way to discover the systems and read their DNS names at the same time. The sample scripts query for EventLog information for all the systems listed in the Active Directory. These scripts can easily be adapted to perform any query supported by WMI e.g. settings configurations, dhcp lease expiry etc. The advantage is that because the queries are semi-synchronous, they work on the data while it is being returned, not as normal, wait for all the data to be returned and then start working on it. Users will be prompted for the name of a domain controller. It is assumed users have sufficient privileges to access WMI on the Domain Controller e.g. administrator. As a safety feature the script also prompts for the maximum number of machines to poll. This can be used to test the script.
Please accept the script as is. Feedback will be gratefully accepted at Debug@huntland.co.uk |
||