Set-WebBinding

Changes a property of an IIS site binding.

Syntax

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

Description

Changes a property of an existing IIS site binding.

Examples

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

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

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

Required Parameters

-BindingInformation

A Binding Information object.

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

The property name of the binding property to change.

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

The value of the binding property.

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

Optional Parameters

-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
-HostHeader

The Host header of the binding.

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

The IP address of the site binding to change.

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

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

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

The port of the site binding to change.

Type:UInt32
Position:2
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