How to stop Sitecore License update nightmare?

Every year, every Sitecore partner must renew the Sitecore license. This process is quite easy and not exciting. Partner must log in to Sitecore Partner Network portal.

Then choose “Renew your partner license” -> “Get New License”.

After several dreary or exciting days, you should be able to download a renewed license, and the nightmare begins.

Let’s assume that you have ten Sitecore developers, and each developer has a few (because developers like to possess) Sitecore instances on the local environment. Did I mention about xConnect instances? Probably each partner has internal Sitecore environments for demo or test purpose.

Have you already counted in how many places you should replace license.xml with a new one? Maybe you forgot about your scaled Sitecore PaaS installation in Azure? Yes, then you have to add more locations where license.xml file should be updated.

How to live, what to do?

  • Use Sitecore PowerShell Extension License Expiration feature
  • Use PowerShell on local instance of Virtual Machine
  • Use PowerShell in Sitecore Azure PaaS

Use License Expiration feature

Please navigate to /sitecore/system/Modules/PowerShell/Script Library/License Expiration and in section Module Activation check Enabled.

Thanks to this feature, you will be notified 14 days before license expiring.

Being informed is far from having an updated license file, but gives you possibility to request a new license on time.

Use PowerShell script for VM or local instance.

On local instance or on Virtual Machine you can use my PowerShell script to update license.xml file in each place. This script can be handy when you have to update license file locally. When you have a scaled environment you have to perform script execution several times or write a script to invoke license update remotely .


#requires -RunAsAdministrator
# Update all licenses
# You can find more about automation with Powershell on http://lets-share.senktas.net
$iisRoot = "C:\inetpub\wwwroot"
$licenseFile = "C:\license.xml"
(Get-ChildItem -Path $iisRoot -Filter 'license.xml' -Recurse).DirectoryName | % { Copy-Item -Path $licenseFile -Destination $_ -Verbose}

Use PowerShell in Azure PaaS

If you have a scaled environment in Azure PaaS, you have to update license in several places for one Sitecore installation. If you multiply this by the number of environments, you got a quite significant amount. Of course, reasonable people create a PowerShell script for that purpose.

Here is the entire script available on GitHub – https://github.com/fdevelop/Sitecore.Cloud.Labs/blob/master/Upload-SitecoreLicense/Upload-SitecoreLicense.ps1


Vinicius Deschamps also described license update for Sitecore Azure PaaS on his blog – https://sitecoresysadmin.wordpress.com/2019/04/25/replace-sitecore-license-in-azure-paas

License Update Agent Overview

As you can see license update is problematic and timeconsuming process even you will automate the whole process with PowerShell scripts. Always there is a need to have a person who will update licenses on all environments in a proper time.
I’m a big fan of automation and delegate are tedious and error-prone to jobs, robots, and other automated solutions. This year I implemented a License Update Agent. In this article, I only describe a high-level architecture and concept. In the next post, I will be entirely focused on License Update Agent solution.

The main idea is to have central storage with our license and license update agent (LUA) installed on each instance with Sitecore. In proper time, LUA will check license storage and update a license to the new one.

License Update module is built from the following components:

  • License Update Agent – installed on each instance and called periodically by Sitecore
  • License Service – module to perform license check and trigger license download 
  • License Provider- module responsible for downloading license from License Endpoint 
  • License Endpoint – an abstraction of storage with license file or files.

License Provider is just a simple code to download a license from a cloud storage or just a shared folder in your network. It’s a interface configured by Dependency Injection.

Next week I plan to make the project available on Github, for test purpose.

Let me know what do you think about this concept on Twitter.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.