Home > front end >  How can i get all instance guid's runnig on my app service in Azure using powershelll?
How can i get all instance guid's runnig on my app service in Azure using powershelll?

Time:11-08

I have a number of instance running under my app service in Azure. I need to get back all the id's of these instances.

I am currently using

Get-AzureRmResource -ResourceGroupName $ResourceGroupName -ResourceType 
Microsoft.Web/sites/instances -Name $WebAppName -ApiVersion 2016-03-01

But is there an equivalent command using the az cmdlets ?

CodePudding user response:

I've tried the exact PowerShell command that you executed in Azure PowerShell. I could be able to get the expected results as shown:

enter image description here

I've tried to get the desired outcome with AZ cmdlet(Bash) and received the expected results using:

az webapp list-instances

To get the instances running info with their respective ID's on app service in Azure:

az configure --defaults group=xxxxResourceGroupName
az configure --defaults web=xxxxwebapp
az webapp list-instances --name xxxxwebappp --resource-group xxxxResourceGroupName

enter image description here

If you want to retrieve "default hostname, EnabledHostName as well as state" of WebApp, Use below command as shown:

enter image description here

Refer MSDoc enter image description here

  • Related