IIS Scripting API
Metabase Concepts
The following table describes concepts that help to understand the structure of the metabase.
Term | Description |
---|---|
Node or Key |
A hierarchical container in the IIS metabase. Each node enables a specific set of properties to be configured at that location or path. For example, at the Web service node, identified by the IIsWebService IIS Glossary at the |
Path or Location |
A path in the metabase uniquely identifies the hierarchical position of a node. For example IIS 6.0: Each key in the metabase contains a Location attribute that specifies the path. |
Property or Custom Property |
A property or custom property defines values that are used to configure IIS. Properties contain attributes, and some properties, such as AccessFlags, also contain flags. Properties are contained by nodes in the metabase. Custom properties are not defined in the schema, but are configurable in the metabase as IIsCustom and contained in the IISConfigObject parent node. |
Attributes |
Metabase properties contain several attributes that describe some characteristics of the property, such as the INHERIT attribute. IIS 6.0: Not to be confused with XML attributes set in the Metabase.xml file, such as the Location attribute. |
Flags |
A flag is a particular bit within the DWORD value of a property that contains flags. Each flag within a property is used to configure particular functionality of the property, such as read or write access. The sum of the flag values for a property becomes the sum of the value attribute for that property. |
Collections |
The structure of the metabase schema is organized using containers called "collections." |
To keep the size of the metabase manageable, IIS allows inheritance of properties from parent node to child node. Not all properties are inheritable properties. If an inheritable property is explicitly set at a child node, the explicit value overrides the inherited value. It is recommended that you do not rely heavily on inheritance. Each inherited property requires extra processing time to allow its value to be obtained from the parent node, and therefore negatively impacts performance. |
This section includes the following topics:
ADSI Object | Description |
---|---|
IIS 5.1 and earlier: This object is not available. |
Controls the status of individual application pools. |
IIS 5.1 and earlier: This object is not available. |
Manages application pools. |
Maps certificates to Microsoft ® Windows ® accounts. |
|
Establishes global settings for HTTP 1.1 compression schemes. |
|
Establishes settings for individual compression schemes. |
|
Establishes global settings for IIS configuration. |
|
Sets properties for custom logging information field nodes. |
|
Provides information about a specific filter. |
|
Manages filters. |
|
Establishes configuration properties for FTP servers in addition to those set at IIsFtpService. |
|
Establishes configuration properties for a single FTP server. |
|
Establishes configuration properties common to all FTP servers. |
|
Sets properties for an individual FTP virtual directory. |
|
Sets access permissions by IP address and domain address. |
|
Contains information about a specific logging module. |
|
Maintains information about installed logging modules. |
|
Manages Multipurpose Internet Mail Extensions (MIME) mappings. |
|
Manipulates the list of valid MIME types. |
|
Sets properties for an individual Web directory. |
|
Sets properties for an individual Web file. |
|
Establishes configuration properties for Web servers in addition to those set at IIsWebService. |
|
Establishes configuration properties for a single Web server. |
|
Establishes configuration properties common to all Web servers. |
|
Sets properties for an individual Web virtual directory. |
Set objW3svc = GetObject("IIS://localhost/w3svc")
For Each objChildObject In objW3svc
' Wscript.Echo objChildObject.Name
Next
'Set WebSite = objW3svc.GetObject("IIsWebService", "localhost/w3svc")
Set WebServer = objW3svc.GetObject("IIsWebServer", 2)
Wscript.Echo WebServer.Name
'WebServer.Stop '停止
Set vdir= WebServer.GetObject("IIsWebVirtualDir", "ROOT")
Wscript.Echo vdir.Name
Set vfile= vdir.GetObject("IIsWebFile", "default.aspx")
Wscript.Echo vfile.Name