Set-WebSitesSite

Modifies configuration settings for a website site.

Syntax

Set-WebSitesSite [-Name] <String> [-AssignWorker <String>] [-ComputeMode <ComputeModeOptions>] [-Confirm]
 [-ForceDnsRegistration] [-HostNames <String[]>] [-RemoteSettings <RemoteSettings>] [-ServerFarm <String>]
 [-SiteMode <String>] [-SkipCustomDomainVerification] [-SkipDnsRegistration] [-SuppressRequestIdLine]
 [-Tags <Hashtable>] [-TimeToLiveInSeconds] [-UnassignAllWorkers] [-UnassignWorker <String>] [-WhatIf]
 [<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.

Parameters

-AssignWorker

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

-AssignWorker "ContosoWorker"

Type:String
Required:False
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
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

-ForceDnsRegistration

{{Fill ForceDnsRegistration Description}}

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

-Name

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

-Name "ContosoInternal"

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

-RemoteSettings

{{Fill RemoteSettings Description}}

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

-SkipCustomDomainVerification

{{Fill SkipCustomDomainVerification Description}}

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

-SuppressRequestIdLine

{{Fill SuppressRequestIdLine Description}}

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

-Tags

{{Fill Tags Description}}

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

-TimeToLiveInSeconds

{{Fill TimeToLiveInSeconds Description}}

Type:SwitchParameter
Required:False
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
Required:False
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
Required:False
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
Required:False
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False