Set-WebBinding

Set-WebBinding

Changes a property of an IIS site binding.

Syntax

Parameter Set: InputBindingProperties
Set-WebBinding [[-Name] <String> ] [[-IPAddress] <String> ] [[-Port] <UInt32> ] -PropertyName <String> -Value <String> [-HostHeader <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: InputBindingInformation
Set-WebBinding [[-Name] <String> ] [-BindingInformation] <String> -PropertyName <String> -Value <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

Changes a property of an existing IIS site binding.

Parameters

-BindingInformation<String>

A Binding Information object.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-HostHeader<String>

The Host header of the binding.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-IPAddress<String>

The IP address of the site binding to change.

Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

The name of the site for which the binding property is changed.

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Port<UInt32>

The port of the site binding to change.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-PropertyName<String>

The property name of the binding property to change.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Value<String>

The value of the binding property.

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

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 (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

-------------- EXAMPLE 1: Changing a Web site binding property --------------

Changes the setting for the Port property for the Default Web Site from 80 to 1234.

IIS:\>Set-WebBinding -Name 'Default Web Site' -BindingInformation "*:80:" -PropertyName Port -Value 1234