Azure PowerShell – App Service Reference

Overview

The Azure PowerShell module provides cmdlets for managing Azure App Service resources, including Web Apps, Functions, and App Service Plans. These cmdlets enable automation of deployment, scaling, configuration, and monitoring tasks directly from the command line or scripts.

Common Cmdlets

CmdletDescription
Get-AzWebAppRetrieves a web app or a list of web apps in a resource group.
New-AzWebAppCreates a new web app in an existing App Service plan.
Set-AzWebAppUpdates settings of an existing web app.
Remove-AzWebAppDeletes a web app.
Get-AzAppServicePlanGets details of an App Service plan.
New-AzAppServicePlanCreates a new App Service plan.
Set-AzAppServicePlanModifies an existing App Service plan.
Restart-AzWebAppRestarts a web app.
Stop-AzWebAppStops a web app.
Start-AzWebAppStarts a stopped web app.

Explore individual cmdlet documentation:

Examples

1. List all Web Apps in a subscription

Connect-AzAccount
Get-AzWebApp | Format-Table Name, ResourceGroup, Location

2. Create a new Web App

$plan = New-AzAppServicePlan -Name MyPlan -ResourceGroup MyRG -Location "West US" -Tier Basic
New-AzWebApp -Name MyWebApp -ResourceGroup MyRG -Location "West US" -AppServicePlan $plan

3. Scale an App Service Plan

Set-AzAppServicePlan -Name MyPlan -ResourceGroup MyRG -NumberofWorkers 3

Resources