ADSI Features

This section discusses ADSI objects and container objects, and how each is implemented and exposed. The IIS Admin Objects are exposed by IIS as an implementation of ADSI. ADSI provides a standard syntax for addressing IIS configuration data. The IIS namespace consists of the IIS Admin Objects and the metabase. The IIS remote administration tool, Internet Services Manager (HTML), uses the IIS Admin Objects.

This section contains:

You can reference IIS Admin Objects by their metabase path. For example, the IIS Admin Object for the first Web site on the computer named MyComputer would be addressed by the ADSI path (ADsPath) IIS://MyComputer/W3SVC/1.

The following VBScript code demonstrates how you might use a script to reference the path to the first Web site (…/1) to open the IIS Admin Object. In the example, this object is associated with the metabase key for the Web site, which resides on the local machine.

Note   You can use the string "LocalHost" instead of the actual machine name.

<% 
  Dim VSvrObj 
  Set VSvrObj = GetObject("IIS://LocalHost/W3SVC/1") 
  Response.Write "Value of ServerComment = " & VSvrObj.ServerComment
%>