Edit

Share via


Remove-IISSiteBinding

Removes a binding from an IIS website. This cmdlet has been introduced in version 1.1.0.0 of IISAdministration module.

Syntax

Default (Default)

Remove-IISSiteBinding
    [-Name] <String>
    [-BindingInformation] <String>
    [[-Protocol] <String>]
    [-RemoveConfigOnly]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

Removes a binding from an IIS website.

Examples

Example 1

PS C:\> Remove-IISSiteBinding -Name "TestSite" -BindingInformation "*:8080:"

This command removes a binding of "*:8080:" from a website named TestSite.

Parameters

-BindingInformation

Specifies the binding information string to use for the new site. The binding information of the form IP:Port:hostname such as 192.168.0.1:80:www.contoso.com and one or more of the fields can be left blank, which is equivalent to using a wildcard character such as *:443:. In this representation * indicates all IP addresses and all hostnames are indicated by leaving the corresponding field blank.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Name

Specifies the name of the IIS website.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:True
Value from remaining arguments:False

-Protocol

The protocol for which the binding is configured, usually http, https or ftp.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RemoveConfigOnly

Indicates that this operation does not remove the SSL certificate information and only removes the IIS binding configuration information in the applicationhost.config.

If you want to delete a HTTPS binding configuration that shares a SSL certificate with other existing bindings, only the IIS binding configuration should be removed so that the SSL certificate information remains. This is to ensure that the other existing bindings will still have access to the certificate.

This parameter is ignored if you are removing a binding which does not have a certificate.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

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

Inputs

String

Outputs

Object