New-WebSitesPolicy
Creates a website site policy.
Syntax
New-WebSitesPolicy
[-PlanName] <String>
[-ComputeMode] <ComputeModeOptions>
[-SiteMode] <String>
[[-CpuLimitPercentage] <Double>]
[[-CpuLimitPeriodInMinutes] <Int32>]
[[-CpuLimitAction] <Int32>]
[[-MemoryLimitInMB] <Int32>]
[[-MemoryLimitWorkingSetInMB] <Int32>]
[[-FailProtectionLimit] <Int32>]
[[-FailProtectionPeriodInSeconds] <Int32>]
[[-FailProtectionPenaltyPeriodInSeconds] <Int32>]
[[-IdleTimeoutInMinutes] <Int32>]
[[-IdleTimeoutAction] <IdleTimeoutActionOptions>]
[[-IdlePriority] <Int32>]
[[-WorkerProcessLimit] <Int32>]
[[-FastCgiProcessLimit] <Int32>]
[[-HttpQueueLength] <Int32>]
[[-CustomDomainsEnabled] <Boolean>]
[[-SniBasedSslEnabled] <Boolean>]
[[-IpBasedSslEnabled] <Boolean>]
[[-FtpEnabled] <Boolean>]
[[-FtpsEnabled] <Boolean>]
[[-WebDeployOverHTTPsEnabled] <Boolean>]
[[-KuduOverHTTPsEnabled] <Boolean>]
[[-IpBasedSslMode] <IpBasedSslModeOptions>]
[[-WorkerProcess64BitEnabled] <Boolean>]
[[-WorkerProcess64BitAsDefault] <Boolean>]
[[-WebSocketsEnabled] <Boolean>]
[[-AlwaysOnEnabled] <Boolean>]
[[-AppConcurrentRequestLimit] <Int32>]
[[-WebSocketConcurrentRequestLimit] <Int32>]
[-RemoteSettings <RemoteSettings>]
[-SuppressRequestIdLine]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-WebSitesPolicy cmdlet creates a website site policy.
Examples
Example 1: Create a site policy
PS C:\> New-WebSitesPolicy -PlanName "Plan01" -ComputeMode "Shared" -SiteMode "Basic"
This command creates a site policy named Plan01. In this plan, the ComputeMode property is set to Shared and the SiteMode property is set to Basic.
Parameters
-AlwaysOnEnabled
{{Fill AlwaysOnEnabled Description}}
Type: | Boolean |
Position: | 32 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AppConcurrentRequestLimit
Specifies the maximum number of concurrent HTTP requests that a single worker process can service.
Type: | Int32 |
Position: | 33 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-ComputeMode
Specifies the type of hosting environment that the web site runs in. Valid values are:
- Shared. The web site runs in a shared/multi-tenant hosting environment.
- Dedicated. The web site runs in its own dedicated hosting environment.
For example:
-ComputeMode "Shared"
Type: | ComputeModeOptions |
Accepted values: | Shared, Dedicated |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-CpuLimitAction
{{Fill CpuLimitAction Description}}
Type: | Int32 |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CpuLimitPercentage
Specifies the CPU limit percentage for sites under this policy. This parameter is used with the CpuLimitPeriod parameter to prevent a single worker process from using a large amount of CPU resources over an extended period of time.
For example, suppose you specify a value of 80 for the CpuLimitPercentage property and a value of 3 minutes for CpuLimitPeriod property. If a worker process consumes 80% or more of CPU resources over a period of 3 minutes, the worker process will be "throttled" in order to reduce its CPU usage.
Type: | Double |
Position: | 3 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CpuLimitPeriodInMinutes
{{Fill CpuLimitPeriodInMinutes Description}}
Type: | Int32 |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-CustomDomainsEnabled
Indicates whether sites can use custom domain names.
Type: | Boolean |
Position: | 17 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FailProtectionLimit
Specifies the number of times a worker process can fail before it is suspended. Fail protection works by specifying values for three properties:
- FailProtectionLimit (for example, 5 failures)
- FailProtectionPeriod (for example 2 minutes)
- FailProtectionPenaltyPeriod (for example, 10 minutes)
The system then monitors a process for 2 minutes (the time specified by the FailProtectionPeriod property). Should 5 failures (the number specified by the FailProtectionLimit property) occur during that time span the process will be shut down. The system then waits 10 minutes (the time specified by FailProtectionPenaltyPeriod property) before restarting the process.
Type: | Int32 |
Position: | 8 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FailProtectionPenaltyPeriodInSeconds
{{Fill FailProtectionPenaltyPeriodInSeconds Description}}
Type: | Int32 |
Position: | 10 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FailProtectionPeriodInSeconds
{{Fill FailProtectionPeriodInSeconds Description}}
Type: | Int32 |
Position: | 9 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FastCgiProcessLimit
Specifies the maximum number of FastCGI processes that a single worker process can create. FastCGI is a programming interface that facilitates communication between a web server and an application.
Type: | Int32 |
Position: | 15 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FtpEnabled
{{Fill FtpEnabled Description}}
Type: | Boolean |
Position: | 20 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-FtpsEnabled
{{Fill FtpsEnabled Description}}
Type: | Boolean |
Position: | 21 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-HttpQueueLength
Specifies the maximum number of HTTP requests that can be in the HTTP queue at any one time.
Type: | Int32 |
Position: | 16 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IdlePriority
{{Fill IdlePriority Description}}
Type: | Int32 |
Position: | 13 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IdleTimeoutAction
Specifies the action taken on idle worker processes. Valid values are:
- 0 or Shutdown. The process is shut down.
- 1 or Suspend. The process is suspended. This value can only be used with Windows Server 2012 R2.
For example:
-IdleTimeOutAction "Suspend"
Type: | IdleTimeoutActionOptions |
Accepted values: | Terminate, Suspend |
Position: | 12 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IdleTimeoutInMinutes
{{Fill IdleTimeoutInMinutes Description}}
Type: | Int32 |
Position: | 11 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IpBasedSslEnabled
Indicates that IP-based SSL is enabled. IP-based SSL associates a certificate and a domain name by mapping the public IP address of the server to the domain name. Among other things, this means that all of your servers must have a dedicated IP address.
Type: | Boolean |
Position: | 19 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IpBasedSslMode
{{Fill IpBasedSslMode Description}}
Type: | IpBasedSslModeOptions |
Accepted values: | Ipv4, Ipv6, Ipv4AndIpv6 |
Position: | 28 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-KuduOverHTTPsEnabled
{{Fill KuduOverHTTPsEnabled Description}}
Type: | Boolean |
Position: | 27 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MemoryLimitInMB
Specifies the amount of memory, in megabytes, assigned to a site.
Type: | Int32 |
Position: | 6 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-MemoryLimitWorkingSetInMB
Specifies the amount of memory, in megabytes, that a working set can use.
Type: | Int32 |
Position: | 7 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PlanName
Specifies a name for the plan. For example:
-PlanName "Standard"
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RemoteSettings
{{Fill RemoteSettings Description}}
Type: | RemoteSettings |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SiteMode
Specifies the site mode of the policy. Valid values are:
- Basic. Used with the Shared, Basic, and Standard plans.
- Limited. Used with the Free plan.
For example:
-SiteMode "Basic"
Type: | String |
Accepted values: | Basic, Limited, Dedicated |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SniBasedSslEnabled
Indicates that SNI-based (Server Name Indication) SSL is enabled. SNI allows a server to associate multiple SSL certificates with a single IP address.
Type: | Boolean |
Position: | 18 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-SuppressRequestIdLine
{{Fill SuppressRequestIdLine Description}}
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WebDeployOverHTTPsEnabled
{{Fill WebDeployOverHTTPsEnabled Description}}
Type: | Boolean |
Position: | 25 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WebSocketConcurrentRequestLimit
{{Fill WebSocketConcurrentRequestLimit Description}}
Type: | Int32 |
Position: | 34 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WebSocketsEnabled
Indicates that WebSockets are enabled. Web sockets facilitate bidirectional communication between a client and a server.
Type: | Boolean |
Position: | 31 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WorkerProcess64BitAsDefault
Indicates that sites run 64-bit worker processes by default. When enabled, administrators who do not want to use 64-bit worker processes must manually modify a site to allow 32-bit processing.
Type: | Boolean |
Position: | 30 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WorkerProcess64BitEnabled
Indicates that sites using this policy can run 64-bit worker processes. When enabled, sites will continue to use 32-bit processing by default. However, administrators can manually enable 64-bit processing for a site.
Type: | Boolean |
Position: | 29 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WorkerProcessLimit
Specifies the maximum number of worker processes that can run on a single worker.
Type: | Int32 |
Position: | 14 |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |