PowerShell to retrieve the details of an existing App Service Environment
I am trying to get the Virtual Network details in which App Service Environment is deployed.
I have tried with Get-AzResource -Name AppServiceEnvironmentName -ResourceType Microsoft.Web/hostingEnvironments
It's giving me the basic App Service Environment details and not having the linked Virtual Network details.
Can you please help me if there is any command/module which helps me to retrive an existing App Service Environment details.
Robert Colbert commented
$ase = Get-AzResource -Name $ASEName -ResourceType Microsoft.Web/hostingEnvironments | Get-AzResource -ExpandProperties
$vnet = Get-AzVirtualNetwork -Name $ase.properties.vnetname -ResourceGroupName $ase.properties.vnetresourcegroupname
$subnet = Get-AzVirtualNetworkSubnetConfig -Name $ase.Properties.vnetSubnetName -VirtualNetwork $vnet
Edwin Moses commented
I need similar CLI features like - az appservice ase list
Get-AzWebApp -Name <> -ResourceGroupName <>
The same question. Waiting for answer.