Remove-WebBinding

Removes a binding from an IIS website.

Syntax

InputBindingProperties (Default)

Remove-WebBinding
    [-Protocol <String>]
    [-Name <String>]
    [-IPAddress <String>]
    [-Port <String>]
    [-HostHeader <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

InputObject

Remove-WebBinding
    -InputObject <PSObject>
    [-Protocol <String>]
    [-Name <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

InputBindingInformation

Remove-WebBinding
    -BindingInformation <String>
    [-Protocol <String>]
    [-Name <String>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-WebBinding cmdlet removes a binding from an Internet Information Services (IIS) website.

Examples

Example 1: Add and remove a site binding

IIS:\> New-WebBinding -Name "Default Web Site" -Port 1234 -IPAddress "*" -HostHeader "testsite" "Sleep 5 seconds before removing the binding"; Sleep 5
IIS:\> Get-WebBinding -Port 1234 -Name "Default Web Site" | Remove-WebBinding

This example creates a binding, and then removes that binding after waiting 5 seconds. The second command uses the Get-WebBinding cmdlet to get the new binding, and then passes it to the current cmdlet by using the pipeline operator.

Parameters

-BindingInformation

Specifies a BindingInformation object.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputBindingInformation
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HostHeader

Specifies the host header of the site binding that this cmdlet removes.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputBindingProperties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-InputObject

Specifies an input object that contains site binding information.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputObject
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-IPAddress

Specifies the IP address of the site from which this cmdlet removes the binding. You can use globbing (*) to specify all IP addresses.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputBindingProperties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Name

Specifies the name of the site from which this cmdlet removes the binding.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Port

Specifies the port used by the binding that this cmdlet removes.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

InputBindingProperties
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-Protocol

Specifies the protocol of the binding that this cmdlet removes.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.