Set-WebSitesSite

Modifies configuration settings for a website site.

Syntax

Set-WebSitesSite
   [-Name] <String>
   [-HostNames <String[]>]
   [-SiteMode <String>]
   [-ComputeMode <ComputeModeOptions>]
   [-ServerFarm <String>]
   [-AssignWorker <String>]
   [-UnassignWorker <String>]
   [-UnassignAllWorkers]
   [-SkipDnsRegistration]
   [-ForceDnsRegistration]
   [-TimeToLiveInSeconds]
   [-SkipCustomDomainVerification]
   [-Tags <Hashtable>]
   [-RemoteSettings <RemoteSettings>]
   [-SuppressRequestIdLine]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-WebSitesSite cmdlet modifies the configuration settings for a website site.

Examples

Example 1: Remove all the workers from a site

PS C:\> Set-WebSitesSite -Name "Site01" -UnassignAllWorkers

This command removes all workers from site Site01.

Example 2: Assign a worker to a site

PS C:\> Set-WebSitesSite -Name "Site01" -AssignWorker "WSERVER01"

This command assigns the worker WSERVER01 to the site Site01.

Example 3: Remove a specific worker from a site

PS C:\> Set-WebSitesSite -Name "Site01" -UnassignWorker "WSERVER01"

This command removes the worker WSERVER01 from the site Site01.

Required Parameters

-Name

Specifies the name of the site being modified. For example:

-Name "ContosoInternal"

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-AssignWorker

Specifies a worker being assigned to the site. For example:

-AssignWorker "ContosoWorker"

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Parameter Sets:Shared, Dedicated
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-ForceDnsRegistration

{{Fill ForceDnsRegistration Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-HostNames

Specifies one or more host names associated with the site. For example:

-HostName "contoso-internal.contoso.com"

To specify multiple host names, separate the names by using commas:

HostName "contoso-internal.contoso.com", "employees.contos.com"

Type:String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-RemoteSettings

{{Fill RemoteSettings Description}}

Type:RemoteSettings
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ServerFarm

Specifies the server farm where the site is placed when switching to a reserved instances. For example:

-ServerFarm "DefaultServerFarm"

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SiteMode

Specifies the site mode. Valid values are:

  • Basic. Used with the Shared, Basic, and Standard plans.
  • Limited. Used with the Free plan.

For example:

-SiteMode "Basic"

Type:String
Parameter Sets:Basic, Limited, Dedicated
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SkipCustomDomainVerification

{{Fill SkipCustomDomainVerification Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SkipDnsRegistration

Indicates that DNS registration is not carried out.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SuppressRequestIdLine

{{Fill SuppressRequestIdLine Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tags

{{Fill Tags Description}}

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-TimeToLiveInSeconds

{{Fill TimeToLiveInSeconds Description}}

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UnassignAllWorkers

Indicates that all workers are removed from the site.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-UnassignWorker

Specifies a worker to remove from the site. For example:

-UnassignWorker "ContosoWorker"

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
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
Accept pipeline input:False
Accept wildcard characters:False