Update your Sitecore License (or any other single file) on Azure Paas with this Script

As a license expires it can suddenly be a daunting task to replace the license.xml file on each web application for each environment in your Sitecore install. I found a great StackOverflow post about publishing a single file where one of the comments (not the accepted answer) provided a script you can use to obtain the publishing credentials and then upload a single file.

The script deploys a source folder to a target destination so I used a folder with only the license.xml as my source argument and /site/wwwroot/App_Data/ as my destination. This allowed me to update the license file on 3 environments with 4 webapps each in about 12 seconds.

.\DeployFolder.ps1 -websiteName Sitetest-cm -resourceGroupName SitetestGroup -sourceDir C:\scmc\DeployFolder -destinationPath “/site/wwwroot/App_Data”


Thanks to the stackoverflow user Lewis Roberts for sharing and crediting original author. https://stackoverflow.com/questions/37787686/upload-publish-webapp-files-to-azure-via-powershell

Leave a Reply

Your email address will not be published. Required fields are marked *