次の方法で共有


SiteContainsApplication Class1

Web サイトとそのアプリケーションの間のリレーションシップを提供します。

構文

class SiteContainsApplication : ObjectContainerAssociation  

メソッド

このクラスにはメソッドが含まれていません。

プロパティ

次の表は、SiteContainsApplication クラスによって公開されるプロパティの一覧です。

名前 説明
Container (ObjectContainerAssociation から継承。)IIS Web サイトを表す読み取り専用の Site オブジェクト。 キー プロパティ。
Element (ObjectContainerAssociation から継承。)IIS アプリケーション プールを表す読み取り専用の Application オブジェクト。 キー プロパティ。

サブクラス

このクラスにはサブクラスが含まれていません。

解説

この関連付けを実装するには、構成 API を使用して、特定のサイトのアプリケーションを列挙します。

次の例は、SiteContainsApplication クラスを使用して Web サイト内のすべてのアプリケーションを取得する方法を示しています。

' Connect to the WMI WebAdministration namespace.  
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")  
  
' Get the Web site.  
Set oSite = oWebAdmin.Get("Site.Name='Default Web Site'")  
  
' Use the SiteContainsApplication class to return the set of  
' application instances in the 'Default Web Site' Web site.  
Set oApps = oSite.Associators_("SiteContainsApplication")  
For Each oApp In oApps  
    WScript.Echo oApp.Path   
Next  

継承階層

ObjectContainerAssociation

SiteContainsApplication

要件

説明
クライアント - 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

参照

Application クラス
ObjectContainerAssociation クラス
Site クラス