Remove-WebBinding

Removes a binding from an IIS website.

Syntax

Remove-WebBinding
      [-Protocol <String>]
      [-Name <String>]
      [-IPAddress <String>]
      [-Port <String>]
      [-HostHeader <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-WebBinding
      -InputObject <PSObject>
      [-Protocol <String>]
      [-Name <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-WebBinding
      [-Protocol <String>]
      [-Name <String>]
      -BindingInformation <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.

Required Parameters

-BindingInformation

Specifies a BindingInformation object.

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

Specifies an input object that contains site binding information.

Type:PSObject
Position:Named
Default value:None
Accept pipeline input:True (ByValue)
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 that this cmdlet removes.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters: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.

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

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

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

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

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

Specifies the protocol of the binding that this cmdlet removes.

Type:String
Position:Named
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