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:
- Save the following VBScript code into a file called localgc.vbs:
On Error Resume Next Set 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 Then Echo "Yes" Else Echo "No" End If
- Start BgInfo (bginfo.exe).
- Click the Custom button, then click New.
- In the Identifier field, enter the identifier "Global Catalog". Then, under "Replace identifier with," select "VB Script file."
- Click Browse, navigate to the location of the localgc.vbs file, then click Open.
- Click OK to close the Define New Field dialog box.
- Click OK to close the User Defined Fields dialog box.
- 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.
0 comments
Hide comments