1
votes

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.

1
What was your solution in the end? Get-AzResource doesn't seem to have the information and neither does Get-WebApp ... just seems really odd.Robert Shattock

1 Answers

1
votes

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