Remove-WebBinding
Remove-WebBinding
Removes a binding from an IIS Web site.
Syntax
Parameter Set: InputBindingProperties
Remove-WebBinding [-HostHeader <String> ] [-IPAddress <String> ] [-Name <String> ] [-Port <String> ] [-Protocol <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: InputBindingInformation
Remove-WebBinding -BindingInformation <String> [-Name <String> ] [-Protocol <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: InputObject
Remove-WebBinding -InputObject <PSObject> [-Name <String> ] [-Protocol <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
Removes a binding from an IIS Web site.
Parameters
-BindingInformation<String>
ABindingInformationobject.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-HostHeader<String>
The host header of the site binding that is to be removed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-InputObject<PSObject>
Specifies an object that contains site binding information.
Aliases |
none |
Required? |
true |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByValue) |
Accept Wildcard Characters? |
false |
-Name<String>
The name of the site from which the binding is removed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Port<String>
The port used by the binding that is to be removed.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Protocol<String>
The protocol of the binding to remove.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
Outputs
The output type is the type of the objects that the cmdlet emits.
Examples
-------------- EXAMPLE 1: Adding and removing a site binding --------------
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.
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