0

I am able to get the complete list of appservice URLs like something.azurewebsites.net but nothing found on the web to list custom domains of all azure webapps. How can I get a list of custom domains for all azure webapps from Azure CLI?

Akash paul
  • 93
  • 2
  • 9

1 Answers1

2
  • To get the custom domains for all the web apps in the Subscription
$webApp = Get-AzWebApp
$hostName = $webApp.HostNames 
# or get all enabled hostnames using $hostName = $webApp.enabledHostNames 
Write-Host $hostName

enter image description here

  • To get the custom domains in the selected Resource Group
$webApp = Get-AzWebApp -ResourceGroupName YourResourceGroupName 
$hostName = $webApp.HostNames
Write-Host $hostName

enter image description here

  • To get the custom domains for the selected web apps
$webApp = Get-AzWebApp -ResourceGroupName YourResourceGroupName -Name WebAppName
$hostName = $webApp.HostNames
Write-Host $hostName

enter image description here

Harshitha Veeramalla
  • 1,515
  • 2
  • 10
  • 11