title | description | ms.date | ms.assetid |
---|---|---|---|
ApplicationPool.Create Method2 |
This article shares syntax, parameters, remarks, an example, and system requirements for ApplicationPool.Create Method2, a Method that creates an IIS application pool. |
10/07/2016 |
cc7d3c44-23df-cec7-c2b6-614a151011bb |
Creates an application pool.
oWebAdmin.Get("ApplicationPool").Create(
AppPoolName,
AutoStart
)
var apppool = oWebAdmin.Get("Application").Create(
AppPoolName,
AutoStart
);
Name | Description |
---|---|
AppPoolName |
[IN] A string value that specifies the name of the new application pool. |
AutoStart |
[IN] An optional boolean value. true if the World Wide Web Publishing Service (WWW service) will start an application pool automatically either when the application pool is created or when IIS is started; otherwise, false . If you disable automatic startup of an application pool, you must start the application pool manually. Disabling automatic startup is useful when you want to make configuration or content changes to an application in the application pool before the application pool starts. |
This method does not return a value.
The Create
method supplants previous methods of creating IIS application pools. To create an application pool in IIS 6.0, you called SpawnInstance_
on the IIsApplicationPoolSetting class, assigned a name to the new application pool, and then called Put_
to save the result to the metabase. Although this procedure will still work in [!INCLUDEiisver], the new Create
method performs the same task in one step.
The following example creates a new application pool.
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:root\WebAdministration")
' Create the new application pool.
oWebAdmin.Get("ApplicationPool").Create("NewAppPool")
Type | Description |
---|---|
Client | - [!INCLUDEiis70] on [!INCLUDEwinvista] - [!INCLUDEiis75] on [!INCLUDEwin7] - [!INCLUDEiis80] on [!INCLUDEwin8] - [!INCLUDEiis100] on [!INCLUDEwin10] |
Server | - [!INCLUDEiis70] on [!INCLUDEwinsrv2008] - [!INCLUDEiis75] on [!INCLUDEwinsrv2008r2] - [!INCLUDEiis80] on [!INCLUDEwinsrv2012] - [!INCLUDEiis85] on [!INCLUDEwinsrv2012r2] - [!INCLUDEiis100] on [!INCLUDEwinsrv2016] |
Product | - [!INCLUDEiis70], [!INCLUDEiis75], [!INCLUDEiis80], [!INCLUDEiis85], [!INCLUDEiis100] |
MOF file | WebAdministration.mof |