Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Display a list of all Azure Web Apps Custom Domain from Azure Cloud Shell

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?

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

  • 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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading