New-WebAppPool
Creates an IIS application pool.
Syntax
New-WebAppPool
[-Name] <String>
[-Force]
[<CommonParameters>]
Description
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.
Examples
Example 1: Create an IIS application pool
IIS:\> New-WebAppPool -Name "NewAppPool"
This command creates an IIS application pool named NewAppPool.
Example 2: Create an IIS application pool and set autoStart
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.
Example 3: Create an IIS application pool and set managedRuntimeVersion
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.
Parameters
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies 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 |
Related Links
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour