New-WebAppPool
Creates a new IIS application pool.
New-WebAppPool
[-Name] <String>
[-Force]
[<CommonParameters>]
The New-WebAppPool cmdlet creates an Internet Information Services (IIS) application pool. For changing different properties of the application pool after creation, see PowerShell Snap-in: Making Configuration Changes to Websites and App Pools.
IIS:\> New-WebAppPool -Name "NewAppPool"
This command creates an IIS application pool named NewAppPool.
IIS:\> $newAppPool = New-WebAppPool -Name "NewAppPool"
IIS:\> $newAppPool.autoStart = "false"
IIS:\> $newAppPool | Set-Item
This command creates an IIS application pool named NewAppPool and sets autoStart property to false.
IIS:\> New-WebAppPool -Name "NewAppPool"
IIS:\> Set-ItemProperty -Path IIS:\AppPools\NewAppPool managedRuntimeVersion "v4.0"
This command creates an IIS application pool named NewAppPool and sets managedRuntimeVersion property to v4.0.
Forces the operation without prompting
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
The name of the IIS application pool to create.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |