Share via


Remove-WebBinding

Remove-WebBinding

Removes a binding from an IIS Web site.

Syntax

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


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


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

Detailed Description

Removes a binding from an IIS Web site.

Parameters

-Protocol <String>

The protocol of the binding to remove.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-Name <String>

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

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-IPAddress <String>

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

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-Port <String>

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

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-HostHeader <String>

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

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-WarningAction <ActionPreference>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WarningVariable <String>

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-WhatIf <SwitchParameter>

Describes what would happen if you executed the command without actually executing the command.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-Confirm <SwitchParameter>

Prompts for confirmation before executing the command.

Attributes

Name Value

Required?

false

Accept wildcard characters?

false

Accept Pipeline Input?

false

Position?

named

-InputObject <PSObject>

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByValue)

Position?

named

-BindingInformation <String>

A BindingInformation object.

Attributes

Name Value

Required?

true

Accept wildcard characters?

false

Accept Pipeline Input?

true (ByPropertyName)

Position?

named

-CommonParameter

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see About Common Parameter

Input and Return Types

The input type is the type of the objects that you can pipe to the cmdlet. The return type is the type of the objects that the cmdlet emits.

Input Type

.

Return Type

.

Notes

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 the Get-WebBinding cmdlet.