My team maintain a large number of web sites. Each is a project in a Visual Studio solution, with a publish profile (Properties\PublishProfiles\xxx.pubxml). Goal is to 1) host each web site in an Azure web app and 2) modify the publish profiles so they publish to the respective web apps.
I have written the Powershell script to generate all web apps, and to download the .PublishSettings files for each web app (using Get-AzureRmWebAppPublishingProfile).
My question is, how do I convert the .PublishSettings files to .pubxml and .pubxml.user files using Powershell? I can do this manually for each site (publish | import profile), but I need to do this in a Powershell script because of the large number of sites involved.
I tried below sample code in my environment to achieve the conversion of
.PublishSettingsfile to.pubxmland.pubxml.userfiles using PowerShell.Output: