Azure Quick PowerShell: Find Empty App Service Plans

Use PowerShell to find Azure App Service Plans in the current Azure Context with no App Services associated with them. These empty App Service Plans will potentially be incurring unnecessary charges.

1Get-AzAppServicePlan | Where-Object {$_.NumberOfSites -eq 0}

Notes

  • Assumes Connect-AzAccount and Set-AzContext have been used to connect and switch to the correct subscription.
  • As the PowerShell returns a list of App Service Plan objects, this can be piped into Remove-AzAppServicePlan to automatically tidy them up.