• subscribe
August 20, 2001 12:00 AM

Using the DispNode and DispTree Scripts

Windows IT Pro
InstantDoc ID #21936
IIS Scripting Solutions

The IIS installation process installs several scripts in the C:\inetpub\adminscripts directory. This month, I introduce you to two such scripts: Display Administrative Node (DispNode.vbs) and Display Administrative Tree (DispTree.vbs). You can use these two scripts to display useful information about your Web sites and services.

Both DispNode.vbs and DispTree.vbs are useful when you need to interrogate a Web site and retrieve configuration information. However, each script provides different information and performs this task in a slightly different way. DispNode.vbs displays administrative information about one node (e.g., a Web site) at a time. DispTree.vbs displays the administrative objects in a site.

These scripts can also help you obtain information about a server. For example, if you need to check the configuration of several Web servers in a farm, you can run either of these scripts remotely against those servers. You can also use the scripts to check the configuration of a new server or to audit servers and provide records of the servers at particular points in time.

Using DispNode.vbs
You can't execute DispNode.vbs without parameters because doing so displays the syntax for the script. You must use the —a parameter to execute the script and pass in the path of the node to display. For example, you can use the command

cscript dispnode.vbs —a IIS://localHost/w3svc

to display information about the W3SVC on localhost. (Be aware that unlike the other characters in the path, the IIS part of the node name is case sensitive.) Figure 1 shows the output from executing this command.

The first five lines in Figure 1 identify the object that the script is querying. Note that the specified path requests information about W3SVC, not about a particular Web site. You know that the information isn't about a site because the Name attribute shows W3SVC and not the ID of a particular site. This information is the default information for all new Web sites.



ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here