Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Remove-WebBinding

Brian Lich|Last Updated: 4/3/2017

SYNOPSIS

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 [-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.

PARAMETERS

-BindingInformation

Specifies a BindingInformation object.

Type: String
Parameter Sets: InputBindingInformation
Aliases: 

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
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
Parameter Sets: InputBindingProperties
Aliases: 

Required: False
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
Parameter Sets: InputBindingProperties
Aliases: 

Required: False
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
Parameter Sets: InputObject
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Name

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

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
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
Parameter Sets: InputBindingProperties
Aliases: 

Required: False
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
Parameter Sets: (All)
Aliases: 

Required: False
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
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

NOTES

Get-WebBinding

New-WebBinding

Set-WebBinding

© 2017 Microsoft