Synopsis
Updates an existing Azure Web App with new configuration settings, connection strings, or deployment slots.
Syntax
Set-AzWebApp
   -ResourceGroupName <String>
   -Name <String>
   [-AppServicePlan <String>]
   [-Location <String>]
   [-AppSettings <Hashtable>]
   [-ConnectionStrings <Hashtable>]
   [-HttpsOnly <Boolean>]
   [-AssignIdentity <String[]>]
   [-Force] [] Parameters
| Name | Type | Required | Description | 
|---|---|---|---|
| -ResourceGroupName | String | Yes | Name of the resource group containing the web app. | 
| -Name | String | Yes | Name of the web app to update. | 
| -AppServicePlan | String | No | Existing App Service plan to associate. | 
| -Location | String | No | Azure region (e.g., EastUS). | 
| -AppSettings | Hashtable | No | Key‑value pairs of app settings. | 
| -ConnectionStrings | Hashtable | No | Connection string definitions. | 
| -HttpsOnly | Boolean | No | Force HTTPS traffic only. | 
| -AssignIdentity | String[] | No | Managed identities to assign. | 
| -Force | SwitchParameter | No | Suppress confirmation prompts. | 
Examples
Example 1: Update app settings
Set-AzWebApp -ResourceGroupName "MyRG" -Name "myWebApp" `
  -AppSettings @{ "Environment" = "Prod"; "LogLevel" = "Warning" }Example 2: Enable HTTPS only and assign a system‑assigned identity
Set-AzWebApp -ResourceGroupName "MyRG" -Name "myWebApp" `
  -HttpsOnly $true -AssignIdentity @()