question

anuraj avatar image
anuraj asked ·

Custom hostname mapping Azure App Service using Powershell

Hello I am using powershell to map custom hostname to azure app service - https://docs.microsoft.com/en-us/azure/app-service/scripts/powershell-configure-custom-domain

It is working as expected. But it is removing all the existing custom domains.

Is there a way to add one more custom domain instead removing all the domain names and add the new one using Power Shell.

azure-webapps
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

techwatching avatar image
techwatching answered ·

I guess you could add a step in your script to get current hostnames (with Get-AzWebApp), put them in an array, add your new custom hostname to that array and pass that array as a the value to -HostNames



Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.