How can I display information on the desktop about whether the local server is a Global Catalog (GC)?

John Savill

March 31, 2004

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. As I discussed in the FAQ "Q. How can I automatically display computer information on my desktop?", Sysinternals offers a free utility called BgInfo that displays configurable system information on your desktop wallpaper. To add information about the local server's GC status, perform the following steps:

  1. Save the following VBScript code into a file called localgc.vbs:

    On Error Resume NextSet WSHNetwork = CreateObject("WScript.Network")Set objRoot = GetObject("LDAP://"&WSHNetwork.ComputerName&"/RootDSE")objDSServiceDN = objRoot.Get("dsServiceName")Set objDSRoot = GetObject("LDAP://"&WSHNetwork.ComputerName&"/" & objDSServiceDN )blnCurrentOptions = objDSRoot.Get("options")If blnCurrentOptions ThenEcho "Yes"ElseEcho "No"End If 
  2. Start BgInfo (bginfo.exe).

  3. Click the Custom button, then click New.

  4. In the Identifier field, enter the identifier "Global Catalog". Then, under "Replace identifier with," select "VB Script file."

  5. Click Browse, navigate to the location of the localgc.vbs file, then click Open.

  6. Click OK to close the Define New Field dialog box.

  7. Click OK to close the User Defined Fields dialog box.

  8. Select "Global Catalog" from the Fields list, then click Add.

Now when you click OK to run BgInfo, the local server's GC status appears on the desktop with the other system information. You can also run the script locally (i.e., outside of BgInfo) by replacing the Echo commands in the script with WScript.Echo.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like