ApplicationContainsVirtualDirectory Class2
IIS アプリケーションとその仮想ディレクトリの間のリレーションシップを提供します。
構文
class ApplicationContainsVirtualDirectory : ObjectContainerAssociation
メソッド
このクラスにはメソッドが含まれていません。
プロパティ
次の表は、ApplicationContainsVirtualDirectory
クラスによって公開されるプロパティの一覧です。
名前 | 説明 |
---|---|
Container |
(ObjectContainerAssociation から継承。)IIS アプリケーション プールを表す読み取り専用の Application オブジェクト。 キー プロパティ。 |
Element |
(ObjectContainerAssociation から継承。)IIS 仮想ディレクトリを表す読み取り専用 VirtualDirectory オブジェクト。 キー プロパティ。 |
サブクラス
このクラスにはサブクラスが含まれていません。
解説
この関連付けにより、特定のアプリケーションの仮想ディレクトリが列挙されます。
例
次の例では、既定の Web サイトの仮想ディレクトリ パスと物理パスの一覧を示します。
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the application for the default Web site.
Set oApp = oWebAdmin.Get("Application.SiteName='Default Web Site',Path='/'")
' Return the set of virtual directory instances in the application.
Set oVDirs = oApp.Associators_("ApplicationContainsVirtualDirectory")
' Print out the virtual directories and their physical paths.
For Each oVDir In oVDirs
WScript.Echo "Virtual Path: " & oVDir.Path
WScript.Echo "PhysicalPath: " & oVDir.PhysicalPath
WScript.Echo
Next
前のコード例にある、次の構文に注意してください。
Set oVDirs = oApp.Associators_("ApplicationContainsVirtualDirectory")
コードを簡略化するために、次の構文を代わりに使用できます。これにより、正確な名前を覚えずに関連付けを使用できます。
Set oVDirs = oApp.Associators_(, "VirtualDirectory")
継承階層
ApplicationContainsVirtualDirectory
要件
型 | 説明 |
---|---|
クライアント | - 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 クラス
VirtualDirectory クラス