Set-Web Binding

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

The Set-WebBinding cmdlet changes a property of an existing Internet Information Services (IIS) site binding.

Examples

Example 1: Change a web site binding property

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

This command changes the setting for the Port property for the default website from 80 to 1234.

Required Parameters

-BindingInformation

Specifies a BindingInformation object.

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

Specifies 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

Specifies 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

Specifies the host header of the site binding to change.

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

Specifies 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

Specifies the name of the site for which this cmdlet changes the binding property.

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

Specifies 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