Remove-WebBinding

Removes a binding from an IIS Web site.

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

Removes a binding from an IIS Web site.

Examples

-------------- EXAMPLE 1: Adding and removing a site binding --------------

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

The example demonstrates how to create a new binding, and then remove that binding after waiting 5 seconds. Piping is used to remove the site binding returned by theGet-WebBindingcmdlet.

Required Parameters

-BindingInformation

ABindingInformationobject.

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

Specifies an 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

The host header of the site binding that is to be removed.

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

The IP address of the site from which the binding is removed. The use of globbing (*) is supported to specify all IP addresses.

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

The name of the site from which the binding is removed.

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

The port used by the binding that is to be removed.

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

The protocol of the binding to remove.

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