Remove-AzWebApp

Removes an Azure Web App.

SYNOPSIS

Removes an Azure Web App.

SYNTAX

Remove-AzWebApp -ResourceGroupName <String> -Name <String> [-Force] [-AsJob] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Remove-AzWebApp cmdlet removes an Azure Web App.

You can use the -Force parameter to remove the Web App without a confirmation prompt.

You can use the -WhatIf parameter to simulate the removal of the Web App without actually performing the removal.

You can use the -Confirm parameter to prompt for confirmation before removing the Web App.

PARAMETERS

Name Type Description
-ResourceGroupName String The name of the resource group to which the Web App belongs.
-Name String The name of the Web App to remove.
-Force SwitchParameter Do not prompt for confirmation.
-AsJob SwitchParameter Run cmdlet in the background.
-WhatIf SwitchParameter Shows what would happen if the cmdlet runs. The cmdlet is not run.
-Confirm SwitchParameter Prompts you for confirmation before running the cmdlet.

EXAMPLES

Example 1: Remove a Web App by name and resource group

This command removes the Web App named 'MyWebApp' in the resource group 'MyResourceGroup'.

Remove-AzWebApp -ResourceGroupName "MyResourceGroup" -Name "MyWebApp"

Example 2: Remove a Web App without confirmation

This command removes the Web App named 'MyWebApp' in the resource group 'MyResourceGroup' without prompting for confirmation.

Remove-AzWebApp -ResourceGroupName "MyResourceGroup" -Name "MyWebApp" -Force

Example 3: Simulate removing a Web App

This command shows what would happen if you tried to remove the Web App named 'MyWebApp' in the resource group 'MyResourceGroup', but does not actually remove it.

Remove-AzWebApp -ResourceGroupName "MyResourceGroup" -Name "MyWebApp" -WhatIf

RELATED LINKS