nerdexam
Microsoft

AZ-104 · Question #373

Hotspot Question You have an Azure web app named WebApp1. You need to provide developers with a copy of WebApp1 that they can modify without affecting the production WebApp1. When the developers…

The correct answer is -ResourceGroupName AdatumWebApps -Name WebApp1 -AppServicePlan ADatumASP1: New-AzureRMWebAppSlot; WebApp1 -Slot Staging: -SourceWebApp. This question tests knowledge of Azure App Service deployment slots, which allow you to create staging environments for web apps without affecting production. Deployment slots enable zero-downtime deployments by allowing you to swap slot content into production.

Submitted by devops_kid· Mar 4, 2026Deploy and manage Azure compute resources

Question

Hotspot Question You have an Azure web app named WebApp1. You need to provide developers with a copy of WebApp1 that they can modify without affecting the production WebApp1. When the developers finish testing their changes, you must be able to switch the current line version of WebApp1 to the new version. Which command should you run prepare the environment? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Answer:

Exhibit

AZ-104 question #373 exhibit

Answer Area

  • -ResourceGroupName AdatumWebApps -Name WebApp1 -AppServicePlan ADatumASP1New-AzureRMWebAppSlot
    New-AzureRmWebAppNew-AzureRmWebAppBackupNew-AzureRMWebAppSlotSwitch-AzureRmWebAppSlot
  • WebApp1 -Slot Staging-SourceWebApp
    -AseName-DefaultProfile-SourceWebApp

Explanation

This question tests knowledge of Azure App Service deployment slots, which allow you to create staging environments for web apps without affecting production. Deployment slots enable zero-downtime deployments by allowing you to swap slot content into production.

Approach. The correct command to prepare the environment is 'az webapp deployment slot create --name WebApp1 --resource-group <ResourceGroup> --slot staging'. This creates a new deployment slot (e.g., named 'staging') for WebApp1 where developers can deploy and test their changes independently. Once testing is complete, you use 'az webapp deployment slot swap --name WebApp1 --resource-group <ResourceGroup> --slot staging' to swap the staging slot into production, instantly switching which version of the app is live. Deployment slots are a feature of Standard, Premium, and Isolated App Service plans, so the plan must be at one of these tiers. The swap operation is near-instantaneous and includes the ability to swap back (swap with preview) if issues arise after promotion.

Concept tested. Azure App Service Deployment Slots - creating staging environments using 'az webapp deployment slot create' and swapping them to production using 'az webapp deployment slot swap' to enable zero-downtime deployments and easy rollback.

Reference. https://learn.microsoft.com/en-us/azure/app-service/deploy-staging-slots

Topics

#Azure App Service#Deployment Slots#Slot Swapping

Community Discussion

No community discussion yet for this question.

Full AZ-104 Practice