Set-IisWebsiteID

Sets a website's ID to an explicit number.

Syntax

Set-IisWebsiteID [-SiteName] <String> [-ID] <Int32> [-WhatIf] [-Confirm] [<CommonParameters>]

Description

IIS handles assigning websites individual IDs. This method will assign a website explicit ID you manage (e.g. to support session sharing in a web server farm).

If another site already exists with that ID, you'll get an error.

Parameters

Name Type Description Required? Pipeline Input Default Value
SiteName String The website name. true false
ID Int32 The website's new ID. true false
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

EXAMPLE 1

Set-IisWebsiteID -SiteName Holodeck -ID 483

Sets the Holodeck website's ID to 483.