You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.
To add an application pool to a Web server by using default settings, use the following syntax:
appcmd add apppool /name:
string
The variable string is the name that you want for the application pool. For example, to add an application pool named Marketing, type the following at the command prompt, and then press ENTER:
appcmd add apppool /name:
Marketing
By default, IIS adds an application pool that runs in integrated mode and uses .NET Framework version 2.0. If you want to add an application pool that runs a different version of the .NET Framework or that uses classic mode, you can specify the .NET Framework version with the /managedRuntimeVersion attribute and the managed request-processing mode with the /managedPipelineMode attribute.
To add an application pool to a Web server by using settings different from the default settings, use the following syntax:
appcmd add apppool /name:
string
/managedRuntimeVersion:
.string
/managedPipelineMode: Integrated | Classic
The variable namestring is the name that you want for the application pool. The variable managedRuntimeVersionstring is the version of the .NET Framework that you want the application pool to run. When you want to run a specific version of the .NET Framework, specify the value for managedRuntimeVersionstring as v1.0, v1.1, or v2.0, or leave the value blank if you do not want to run managed code in the application pool. For example, to add an application pool that does not run managed code and that uses classic mode, type the following at the command prompt, and then press ENTER:
appcmd add apppool /name:Marketing /managedRuntimeVersion: /managedPipelineMode:Classic
For more information about Appcmd.exe, see Appcmd.exe.
The procedure in this topic affects the following configuration elements:
<add> element under <applicationPools>
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.