Edit

Share via


Remove-AzWebAppSSLBinding

Removes an SSL binding from an uploaded certificate.

Syntax

S1

Remove-AzWebAppSSLBinding
    [-Name] <String>
    [[-DeleteCertificate] <Boolean>]
    [-ResourceGroupName] <String>
    [-WebAppName] <String>
    [[-Slot] <String>]
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

S2

Remove-AzWebAppSSLBinding
    [-Name] <String>
    [[-DeleteCertificate] <Boolean>]
    [-WebApp] <PSSite>
    [-Force]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Remove-AzWebAppSSLBinding cmdlet removes a Secure Sockets Layer (SSL) binding from an Azure Web App. SSL bindings are used to associate a Web App with a certificate.

Examples

Example 1: Remove an SSL binding for a web app

Remove-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp" -Name "www.contoso.com"

This command removes the SSL binding for the web app ContosoWebApp. Since the DeleteCertificate parameter is not included, the certificate will be deleted if it no longer has any SSL bindings.

Example 2: Remove an SSL binding without removing the certificate

Remove-AzWebAppSSLBinding -ResourceGroupName "ContosoResourceGroup" -WebAppName "ContosoWebApp" -Name "www.contoso.com" -DeleteCertificate $False

Similar to Example 1, this command also removes the SSL binding for the Web App ContosoWebApp. In this case, however, the DeleteCertificate parameter is included, and the parameter value is set to $False. That means that the certificate will not be deleted regardless of whether it has any SSL bindings or not.

Example 3: Use an object reference to remove an SSL binding

$WebApp = Get-AzWebApp -Name "ContosoWebApp"
Remove-AzWebAppSSLBinding -WebApp $WebApp -Name "www.contoso.com"

This example uses an object reference to the Web App website to remove the SSL binding for a Web App. The first command uses the Get-AzWebApp cmdlet to create an object reference to the Web App named ContosoWebApp. That object reference is stored in a variable named $WebApp. The second command uses the object reference and the Remove-AzWebAppSSLBinding cmdlet to remove the SSL binding.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
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

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure.

Parameter properties

Type:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, AzureRmContext, AzureCredential

Parameter sets

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

-DeleteCertificate

Specifies the action to take place if the SSL binding being removed is the only binding used by the certificate. If DeleteCertificate is set to $False, the certificate will not be deleted when the binding is deleted. If DeleteCertificate is set to $True or is not included in the command, the certificate will be deleted along with the SSL binding. The certificate will only be deleted if the SSL binding being removed is the only binding used by the certificate. If the certificate has more than one binding, the certificate will not be removed regardless of the value of the DeleteCertificate parameter.

Parameter properties

Type:

Nullable<T>[Boolean]

Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

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

-Force

Forces the command to run without asking for user confirmation.

Parameter properties

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

Parameter sets

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

-Name

Specifies the name of the Web App.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

Specifies the name of the resource group that the certificate is assigned to. You cannot use the ResourceGroupName parameter and the WebApp parameter in the same command.

Parameter properties

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

Parameter sets

S1
Position:0
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Slot

Specifies the Web App deployment slot. To get a deployment slot, use the Get-AzWebAppSlot cmdlet.

Parameter properties

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

Parameter sets

S1
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WebApp

Specifies a Web App. To get a Web App, use the Get-AzWebApp cmdlet. You cannot use the WebApp parameter in the same command as the ResourceGroupName parameter and/or the WebAppName.

Parameter properties

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

Parameter sets

S2
Position:0
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-WebAppName

Specifies the name of the Web App. You cannot use the WebAppName parameter and the WebApp parameter in the same command.

Parameter properties

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

Parameter sets

S1
Position:1
Mandatory:True
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.Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
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

PSSite

Outputs

Void