Custom hostname mapping Azure App Service using Powershell

Anuraj P 146 Reputation points MVP

Hello I am using powershell to map custom hostname to azure app service -

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

    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