I am using the command:
$hostnames = Get-AzureRmWebApp -ResourceGroupName "app-rg" -Name "app" |
Select-Object -Property hostnames
To return the list of hostnames with an azure web app as below:
HostNames : {a.arup.com, a.internet.trafficmanager.net, a.azurewebsites.net}
However, I am interested in getting the first domain (a.arup.com). How would this be done with powershell?
There is always an alternative in PowerShell:
$hostnames = Get-AzureRmWebApp -ResourceGroupName "app-rg" -Name "app" |
Select-Object -ExpandProperty hostnames -First 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With