BindingElement Class1
Web サイトのバインディング要素を表します。
構文
class BindingElement : CollectionElement
メソッド
このクラスにはメソッドが含まれていません。
プロパティ
次の表は、BindingElement
クラスによって公開されるプロパティの一覧です。
名前 | 説明 |
---|---|
BindingInformation |
Web サイトのバインディング情報を指定する 3 つのコロン区切りフィールドを含む、空でない読み取り/書き込みの string 値。 最初のフィールドは、特定の IP アドレスまたはアスタリスクです (アスタリスクは、割り当てられていないすべての IP アドレスを指定します)。 2 番目のフィールドはポート番号です。既定値は 80 です。 3 番目のフィールドは、オプションのホスト ヘッダーです。 |
Protocol |
サイト バインディングで使用されるプロトコルを指定する、必須の一意の空でない読み取り/書き込みの string 値。 既定値は "HTTP" です。 キー プロパティ。 |
サブクラス
このクラスにはサブクラスが含まれていません。
解説
このクラスのインスタンスは、Site クラスの Bindings
配列プロパティに含まれています。
例
次の例では、Web サーバー上のすべてのサイトのバインディングを取得します。
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get all Web site instances.
Set oSites = oWebAdmin.InstancesOf("Site")
' Display the name of each site and its bindings.
For Each oSite In oSites
WScript.Echo oSite.Name
For Each objItem in oSite.Bindings
Wscript.Echo "Binding Info: " & objItem.BindingInformation
Wscript.Echo "Protocol: " & objItem.Protocol
Next
WScript.Echo
Next
継承階層
BindingElement
要件
型 | 説明 |
---|---|
クライアント | - Windows Vista 上の IIS 7.0 - Windows 7 上の IIS 7.5 - Windows 8 上の IIS 8.0 - Windows 10 上の IIS 10.0 |
[サーバー] | - Windows Server 2008 上の IIS 7.0 - Windows Server 2008 R2 上の IIS 7.5 - Windows Server 2012 上の IIS 8.0 - Windows Server 2012 R2 上の IIS 8.5 - Windows Server 2016 上の IIS 10.0 |
Product | - IIS 7.0、IIS 7.5、IIS 8.0、IIS 8.5、IIS 10.0 |
MOF ファイル | WebAdministration.mof |