Remove-AzureRmWebAppSSLBinding
Removes an SSL binding from an uploaded certificate.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Remove-AzureRmWebAppSSLBinding
[-Name] <String>
[[-DeleteCertificate] <Boolean>]
[-Force]
[-ResourceGroupName] <String>
[-WebAppName] <String>
[[-Slot] <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Remove-AzureRmWebAppSSLBinding
[-Name] <String>
[[-DeleteCertificate] <Boolean>]
[-Force]
[-WebApp] <PSSite>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Remove-AzureRmWebAppSSLBinding 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
PS C:\>Remove-AzureRmWebAppSSLBinding -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
PS C:\>Remove-AzureRmWebAppSSLBinding -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
PS C:\>$WebApp = Get-AzureRmWebApp -Name "ContosoWebApp"
PS C:\> Remove-AzureRmWebAppSSLBinding -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-AzureRmWebApp 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-AzureRmWebAppSSLBinding cmdlet to remove the SSL binding.
Parameters
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | Nullable<T>[Boolean] |
Position: | 4 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
Position: | 5 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Specifies the name of the Web App.
Type: | String |
Position: | 3 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Slot
Specifies the Web App deployment slot. To get a deployment slot, use the Get-AzureRMWebAppSlot cmdlet.
Type: | String |
Position: | 2 |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WebApp
Specifies a Web App. To get a Web App, use the Get-AzureRmWebApp cmdlet. You cannot use the WebApp parameter in the same command as the ResourceGroupName parameter and/or the WebAppName.
Type: | PSSite |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-WebAppName
Specifies the name of the Web App. You cannot use the WebAppName parameter and the WebApp parameter in the same command.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | 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.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Inputs
Parameters: WebApp (ByValue)