Custom hostname mapping Azure App Service using Powershell

Anuraj 166 Reputation points MVP
2020-05-31T05:38:01.427+00:00

Hello I am using powershell to map custom hostname to azure app service - https://learn.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 App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
7,003 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alexandre 346 Reputation points
    2020-05-31T09:54:34.853+00:00

    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

    0 comments No comments