Reputation: 622
Given the name of an Azure App Service, I want to be able to find the name of the App Service plan. I've inspected the object returned by Get-WebApp but it doesn't contain any reference to the App Service Plan used.
Upvotes: 1
Views: 1380
Reputation: 2009
Using bash script and Azure CLI, run the following command:
az functionapp show --name <function_app> --resource-group <resource_group> --query "properties.serverFarmId"
The above script will extract the serverFarmId
property.
Upvotes: 0
Reputation: 72171
you can use this bit:
Get-AzWebApp | Select-Object name, serverfarmid
this will return Web App name and the Service Plan Id.
( Get-AzWebApp | Select-Object -ExpandProperty ServerFarmId ) -split '/' | Select-Object -Last 1
Upvotes: 1