Set-WebSitesPolicy

Modifies a website site policy.

Syntax

Set-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>]
   [[-CsmOverHTTPEnabled] <Boolean>]
   [[-CsmOverHTTPsEnabled] <Boolean>]
   [[-WebDeployOverHTTPEnabled] <Boolean>]
   [[-WebDeployOverHTTPsEnabled] <Boolean>]
   [[-KuduOverHTTPEnabled] <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 Set-WebSitesPolicy cmdlet modifies a website site policy.

Examples

Example 1: Configure a site policy

PS C:\> Set-WebSitesPolicy -PlanName "04838e4a-7b3f-4360-a122-41739ef9f3bb" -ComputeMode "Shared" -SiteMode "Basic" -MemoryLimitInMB 384 -MemoryLimitWorkingSetInMB 256 -HttpQueueLength 2000 -CustomDomainsEnabled $True -SniBasedSslEnabled $True -IpBasedSslEnabled $True -IpBasedSslMode "Ipv4AndIpv6" -WorkerProcess64BitEnabled $True -WorkerProcess64BitAsDefault $False -WebSocketsEnabled $True -AppConcurrentRequestLimit 6000 -IdleTimeoutAction "Suspend"

This command configures the site policy for sites in Basic mode that have the plan name 04838e4a-7b3f-4360-a122-41739ef9f3bb (this plan name corresponds to the subscription ID).

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 the 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

-CsmOverHTTPEnabled

{{Fill CsmOverHTTPEnabled Description}}

Type:Boolean
Position:22
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-CsmOverHTTPsEnabled

{{Fill CsmOverHTTPsEnabled Description}}

Type:Boolean
Position:23
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-CustomDomainsEnabled

Indicates that 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. Thus 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

Specifies the supported IP address types. Valid values are:

  • Ipv4
  • Ipv6
  • Ipv4AndIpv6

For example:

-IpBasedSslMode "IPv6"

Type:IpBasedSslModeOptions
Accepted values:Ipv4, Ipv6, Ipv4AndIpv6
Position:28
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-KuduOverHTTPEnabled

{{Fill KuduOverHTTPEnabled Description}}

Type:Boolean
Position:26
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.

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

-WebDeployOverHTTPEnabled

{{Fill WebDeployOverHTTPEnabled Description}}

Type:Boolean
Position:24
Default value:None
Required:False
Accept pipeline input:True
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 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