设为首页 收藏本站
查看: 456|回复: 0

[经验分享] IIS Scripting API

[复制链接]

尚未签到

发表于 2015-8-13 10:37:13 | 显示全部楼层 |阅读模式
  IIS Scripting API
DSC0000.jpg
  
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 /LM/WSVC path in the metabase, certain properties like AppRoot can be set that affect the IIS Web service. A node is a child of another node if its path includes the path of the parent (for example, /LM/WSVC/1 is a child node of /LM/WSVC).
  Path or Location
  A path in the metabase uniquely identifies the hierarchical position of a node. For example /LM (local machine) is the path of the IIsComputer admin object, of which there can be only one. However, the IIsWebVirtualDir admin object can exist at several paths in the metabase, such as /LM/W3SVC/1/ROOT, /LM/W3SVC/2/ROOT, and /LM/W3SVC/2/ROOT/MyVDir.
  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."
  Inheritance
  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   IIsApplicationPool
  IIS 5.1 and earlier: This object is not available.
  Controls the status of individual application pools.
  IIsApplicationPools
  IIS 5.1 and earlier: This object is not available.
  Manages application pools.
  IIsCertMapper (ADSI)
  Maps certificates to Microsoft ® Windows ® accounts.
  IIsCompressionSchemes (ADSI)
  Establishes global settings for HTTP 1.1 compression schemes.
  IIsCompressionScheme (ADSI)
  Establishes settings for individual compression schemes.
  IIsComputer (ADSI)
  Establishes global settings for IIS configuration.
  IIsCustomLogModule (ADSI)
  Sets properties for custom logging information field nodes.
  IIsFilter (ADSI)
  Provides information about a specific filter.
  IIsFilters (ADSI)
  Manages filters.
  IIsFtpInfo (ADSI)
  Establishes configuration properties for FTP servers in addition to those set at IIsFtpService.
  IIsFtpServer (ADSI)
  Establishes configuration properties for a single FTP server.
  IIsFtpService (ADSI)
  Establishes configuration properties common to all FTP servers.
  IIsFtpVirtualDir (ADSI)
  Sets properties for an individual FTP virtual directory.
  IIsIPSecurity (ADSI)
  Sets access permissions by IP address and domain address.
  IIsLogModule (ADSI)
  Contains information about a specific logging module.
  IIsLogModules (ADSI)
  Maintains information about installed logging modules.
  IIsMimeMap (ADSI)
  Manages Multipurpose Internet Mail Extensions (MIME) mappings.
  IIsMimeType (ADSI)
  Manipulates the list of valid MIME types.
  IIsWebDirectory (ADSI)
  Sets properties for an individual Web directory.
  IIsWebFile (ADSI)
  Sets properties for an individual Web file.
  IIsWebInfo (ADSI)
  Establishes configuration properties for Web servers in addition to those set at IIsWebService.
  IIsWebServer (ADSI)
  Establishes configuration properties for a single Web server.
  IIsWebService (ADSI)
  Establishes configuration properties common to all Web servers.
  IIsWebVirtualDir (ADSI)
  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

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-98346-1-1.html 上篇帖子: 请教一个配置IIS的问题 下篇帖子: FCKEditor 布署到IIS上出现的问题与解决方法
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表