Identifying Global Catalog Servers

Microsoft® Windows® 2000 Scripting Guide

microsoft windows 2000 scripting guide

« Previous | Next »   

Knowing which computers in your organization are global catalog servers is very helpful for administering Active Directory efficiently.

Because global catalog servers are required for user authentication, it is important to have an adequate number of global catalog servers at a site to handle the volume of authentication requests and a quick connection to handle each request efficiently. If a remote office does not have its own global catalog server and is connected over a slow network link, authentication of the site s users will be slow.

However, having too many global catalog servers can slow down your network by creating unnecessary replication traffic. Global catalog servers contain information about every item in the forest and can generate a considerable amount of replication data. A remote office that has its own global catalog servers and is connected over a slow network link can provide efficient authentication to its local users, but it might have trouble communicating with other sites because of the quantity of replication data moving across the network link.

You can identify global catalog servers by using ADSI.

Scripting Steps

Listing 9.17 contains a script that identifies global catalog servers by using ADSI. To carry out this task, the script must perform the following steps:

  1. Use a GetObject call to bind to the root of the directory information tree on a domain controller (rootDSE).

    The rootDSE is a well-known and reliable location on every domain controller. You can use rootDSE to get distinguished names for the domain container, schema container, and configuration container, as well as other information about the server and the contents of its directory information tree.

  2. Use the Get method to retrieve the value of the dsServiceName attribute.

    This attribute represents the distinguished name of the NTDS Settings object for the directory server.

  3. Use a second GetObject call to connect to the NTDS Settings object.

    The NTDS settings represent the data in Active Directory that define a computer as a domain controller.

  4. Use the Get method to retrieve the value of the Options attribute. The Options attribute represents different things depending on the object. For the NTDS Settings object, the Options attribute indicates whether the computer has been enabled as a global catalog server.
    • If the value is True, echo "This computer is a global catalog server."
    • If the value is False, echo "This computer is not a global catalog server."

Listing 9.17   Identifying Global Catalog Servers

1 2 3 4 5 6 7 8 9 10 
On Error Resume Next Set objRoot = GetObject("LDAP://atl-dc-01/RootDSE") objDSServiceDN = objRoot.Get("dsServiceName") Set objDSRoot = GetObject("LDAP://atl-dc-02/" & objDSServiceDN ) blnCurrentOptions = objDSRoot.Get("options") If blnCurrentOptions Then     Wscript.Echo "This computer is a global catalog server." Else     Wscript.Echo "This computer is not a global catalog server." End If

send us your feedback Send us your feedback « Previous | Next »   


Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
Microsoft Windows 2000 Scripting Guide(c) Automating System Administration 2003
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 635

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net