ApplicationPoolContainsApplication Class1
Provides a relationship between an application pool and its applications.
Syntax
class ApplicationPoolContainsApplication : ObjectContainerAssociation
Methods
This class contains no methods.
Properties
The following table lists the properties for the ApplicationPoolContainsApplication
class.
Name | Description |
---|---|
Container |
(Inherited from ObjectContainerAssociation.) A read-only ApplicationPool object that represents an IIS application pool. A key property. |
Element |
(Inherited from ObjectContainerAssociation .) A read-only Application object that represents an IIS application. A key property. |
Subclasses
This class contains no subclasses.
Remarks
To implement this association, use the configuration API to enumerate the applications in an application pool.
Example
The following example shows how to use the ApplicationPoolContainsApplication
class to retrieve all the applications in an application pool.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Get the application pool.
Set oAppPool = oWebAdmin.Get("ApplicationPool.Name='DefaultAppPool'")
' Use the ApplicationPoolContainsApplication class to return the set of
' application instances in the 'DefaultAppPool' application pool.
Set oApps = oAppPool.Associators_("ApplicationPoolContainsApplication")
For Each oApp In oApps
WScript.Echo oApp.Path
Next
Note the following syntax from the preceding code example.
Set oApps = oAppPool.Associators_("ApplicationPoolContainsApplication")
To simplify your code, you can instead use the following syntax, which enables you to use the association without having to remember its exact name.
Set oApps = oAppPool.Associators_(, "Application")
Inheritance Hierarchy
ApplicationPoolContainsApplication
Requirements
Type | Description |
---|---|
Client | - IIS 7.0 on Windows Vista - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
Server | - IIS 7.0 on Windows Server 2008 - IIS 7.5 on Windows Server 2008 R2 - IIS 8.0 on Windows Server 2012 - IIS 8.5 on Windows Server 2012 R2 - IIS 10.0 on Windows Server 2016 |
Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 |
MOF file | WebAdministration.mof |
See Also
Application Class
ApplicationPool Class
ObjectContainerAssociation Class