Creates a new app pool.
Install-IisAppPool -Name <String> [-ManagedRuntimeVersion <String>] [-IdleTimeout <Int32>] [-ClassicPipelineMode] [-Enable32BitApps] [-ServiceAccount <String>] [-PassThru] [<CommonParameters>]
Install-IisAppPool -Name <String> [-ManagedRuntimeVersion <String>] [-IdleTimeout <Int32>] [-ClassicPipelineMode] [-Enable32BitApps] [-ServiceAccount <String>] -UserName <String> -Password <Object> [-PassThru] [<CommonParameters>]
Install-IisAppPool -Name <String> [-ManagedRuntimeVersion <String>] [-IdleTimeout <Int32>] [-ClassicPipelineMode] [-Enable32BitApps] [-ServiceAccount <String>] -Credential <PSCredential> [-PassThru] [<CommonParameters>]
By default, creates a 64-bit app pool running as the ApplicationPoolIdentity
service account under .NET v4.0 with an integrated pipeline.
You can control which version of .NET is used to run an app pool with the ManagedRuntimeVersion
parameter: versions v1.0
, v1.1
, v2.0
, and v4.0
are supported. Use an empty string if you're running .NET Core or to set the .NET framework version to No Managed Code
.
To run an application pool using the classic pipeline mode, set the ClassicPipelineMode
switch.
To run an app pool using the 32-bit version of the .NET framework, set the Enable32BitApps
switch.
An app pool can run as several built-in service accounts, by passing one of them as the value of the ServiceAccount
parameter: NetworkService
, LocalService
, or LocalSystem
The default is ApplicationPoolIdentity
, which causes IIS to create and use a custom local account with the name of the app pool. See Application Pool Identities for more information.
To run the app pool as a specific user, pass the credentials with the Credential
parameter. (In some versions of Carbon, there is no Credential
parameter, so use the UserName
and Password
parameters instead.) The user will be granted the SeBatchLogonRight
privilege.
If an existing app pool exists with name Name
, it's settings are modified. The app pool isn't deleted. (You can't delete an app pool if there are any websites using it, that's why.)
By default, this function will create an application pool running the latest version of .NET, with an integrated pipeline, as the NetworkService account.
Beginning with Carbon 2.0, the PassThru
switch will cause this function to return a Microsoft.Web.Administration.ApplicationPool
object for the created/updated application pool.
Beginning with Carbon 2.0.1, this function is available only if IIS is installed.
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String | The app pool's name. |
true | false | |
ManagedRuntimeVersion | String | The managed .NET runtime version to use. Default is 'v4.0'. Valid values are |
false | false | v4.0 |
IdleTimeout | Int32 | Idle Timeout value in minutes. Default is 0. |
false | false | 0 |
ClassicPipelineMode | SwitchParameter | Use the classic pipeline mode, i.e. don't use an integrated pipeline. |
false | false | False |
Enable32BitApps | SwitchParameter | Enable 32-bit applications. |
false | false | False |
ServiceAccount | String | Run the app pool under the given local service account. Valid values are |
false | false | |
UserName | String | OBSOLETE. The |
true | false | |
Password | Object | OBSOLETE. The |
true | false | |
Credential | PSCredential | The credential to use to run the app pool. The |
true | false | |
PassThru | SwitchParameter | Return an object representing the app pool. |
false | false | False |
Install-IisAppPool -Name Cyberdyne -ServiceAccount NetworkService
Creates a new Cyberdyne application pool, running as NetworkService, using .NET 4.0 and an integrated pipeline. If the Cyberdyne app pool already exists, it is modified to run as NetworkService, to use .NET 4.0 and to use an integrated pipeline.
Install-IisAppPool -Name Cyberdyne -ServiceAccount NetworkService -Enable32BitApps -ClassicPipelineMode
Creates or sets the Cyberdyne app pool to run as NetworkService, in 32-bit mode (i.e. 32-bit applications are enabled), using the classic IIS request pipeline.
Install-IisAppPool -Name Cyberdyne -Credential $charlieBrownCredential
Creates or sets the Cyberdyne app pool to run as the PEANUTS\charliebrown
domain account, under .NET 4.0, with an integrated pipeline.