Set-WebSitesSite

Set-WebSitesSite

Updates the configuration of a tenant web site.

Syntax

Parameter Set: Default
Set-WebSitesSite [-Name] <String> [-AssignWorker <String> ] [-ComputeMode {Shared | Dedicated} ] [-HostNames <String[]> ] [-PipelineVariable <String> ] [-ServerFarm <String> ] [-SiteMode <String> ] [-SkipDnsRegistration] [-UnassignAllWorkers] [-UnassignWorker <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]


 

Detailed Description

The Set-WebSitesSite cmdlet updates the configuration of a tenant web site. You can use this cmdlet to assign a site to or remove a site from a worker.

Parameters

-AssignWorker<String>

Specifies the worker to assign the site to.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 


-ComputeMode<ComputeModeOptions>

Specifies the compute mode. Valid values are:

-- Shared

-- Dedicated

The acceptable values for this parameter are:

 

Shared

 

Dedicated

 

 

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-HostNames<String[]>

Specifies an array of host names for a site.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Name<String>

Specifies the name of a site.

 

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-PipelineVariable<String>

Specifies a variable to be used with the pipeline operator.

 

Aliases

pv

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-ServerFarm<String>

Specifies the server farm that the site is placed in when switching to reserved instances. As a default, specify "DefaultServerFarm".

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 


-SiteMode<String>

Specifies the site mode. Valid values are:

-- Basic

-- Limited

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-SkipDnsRegistration

Indicates that DNS registration is skipped.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-UnassignAllWorkers

Indicates that the site is removed from all workers.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-UnassignWorker<String>

Specifies the worker from which to remove the site.

 

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

 

-Confirm

Prompts you for confirmation before executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

-WhatIf

Describes what would happen if you executed the command without actually executing the command.

 

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters.

Examples

Example 1: Remove a site from all workers running the site

This command removes the site named Site01 from all workers that are currently running the site.

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

 

Example 2: Assign a site to a worker

This command assigns the site named Site01 to the worker named WSERVER01.

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

 

Example 3: Remove a site from a specific worker

This command removes the site named Site01 from the worker named WSERVER01.

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

 

Related topics

New-WebSitesSite

Get-WebSitesSite

Restart-WebSitesSite

Remove-WebSitesSite