Custom hostname mapping Azure App Service using Powershell

Anuraj P 146 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 Services
Azure App Services
A feature of Azure App Service used to create and deploy scalable, mission-critical web apps.
4,339 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Alexandre 341 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

    No comments