Copying Unicorn Files With PowerShell for Azure Pipeline within an Helix style solution without GULP

In the case, you have an Helix style solution, you are using Unicorn and you use Azure Dev ops as your build pipeline to publish your solution on Azure PAAS and you want to use Gulp only for styles and scripts manipulations…

you will definitively need this snippet since you probably have already encountered this problem within your Build Pipeline…

The principle is pretty simple, you need to copy your YML files and keep all the folder structure within serialization… within the App_Data/Unicorn folder within a website Temp folder that you will later zip with the rest of Bin and Views so that you can install your changes once the package is deployed across the environment…

This is done within the Gulp – Package task typically, but if you want to get rid of it, I would recommend doing a separate PowerShell Task just to copy Unicorn files…


The content of the Powershell is pretty simple and copy the files keeping your serialization structure across Feature, Foundation, Project folders…

Disaster Recovery region in Azure for Sitecore 9.x

In case you are worried about an Azure region going down and want to make your Sitecore Azure infrastructure not dependent on a single region, deploying a region for disaster recovery could be an option…

Obviously, depending on the complexity of your website, Sitecore resilience may be the minor problem in case of a region failure and further conversation should be taken to ensure that your infrastructure and data can be available across multiple regions….

As you can imagine, if your site is relying on Sitecore Analytics for personalization features your task won’t be trivial due to the Sitecore architecture, however, is a fair assumption and common practice to have analytics turned off on the DR region…

A typical DR region for Sitecore, would need the following elements:

  • Content Delivery server
  • WebDatabase
  • Redis cache (you could consider switching off if budget is an issue)
  • Search (assuming that is mandatory to have search available in case of DR)

My recommendation to provision a DR region on Azure PAAS would be to use the XM scaled scripts to provision a new environment in your favourite “backup” region and then delete the unrequired resources:

  • Identity server
  • Content Management Server
  • Master Database

The following Powershell script shows how to run the clean up of these resources…


Sitecore 9.2 Powershell using ARM Template for Azure PaaS

As you have probably heard, SAAS is coming summer 2020… but if your Sitecore project cannot wait that long, ARM templates are what you need to provision your Sitecore application on Azure PAAS…

In case you have no idea where to start, a few things that you need to know and decide

Sitecore Topology: you will have to choose between XM in case you do not need analytics and XP in case you need the fully flagged platform…

The topology is very different adding several additional configurations and servers in case you decide to go with the analytics….

Size of your installation, this will preset the size and kind of services provisioned, the default setting is extrasmall so that you can save on costs….

The url to get the Sitecore templates for 9.2 is

In addition to this, you will need the WDP packages for the topology selected don’t forget to download WDP for the identity server…

In addition to this, you will need a valid sitecore license, an azure subscription and you can provision a certificate for your test instance….

Once you have all the resource ready you will have upload on azure the WDP and the ARM templates in a storage account / Container…

Assuming you are going for the XM Scaled template, will look like:


once you are ready with thearm template, you can start editing your powershell required for trigger the deployment:

here is a very good example…

once you are ready to start provisioning, keep calm since the XM templates took more than 30 minutes and the XP scaled will take you more than one hour to complete…

in case you are working with test certificates, do not forget to add a allowInvalidClientCertificates parameter and set it to true in the parameters.json file…

Also worth mentioning that the key command to launch to provision your infrastructure is New-AzureRmResourceGroupDeployment -ResourceGroupName $Name -TemplateFile $ArmTemplateUrl -TemplateParameterObject $additionalParams -Debug -Verbose

note that the additionalparams is a hashtable generated from the parameters.json…

Sitecore 9.2 Dev Environment setup

I am glad to blog about the improvements in the Developer experience installing Sitecore 9.2… in case you have installed already Sitecore 9, you were probably aware of the pain and joy related to it… With Sitecore 9.2 luckily most of the misery is gone and installation is simpler and easier….


Windows 10 

Not sure which version I have, but certainly, help to have Powershell 5.1 and have an administrator account

SQL server

I went for SQL 2017 Developer edition and a fresh instance dedicated to Sitecore…

As additional configuration steps, remember to enable mixed authentication and do a SQL sysadmin account to install and run your sitecore setup and DB

In addition, I have enabled Contained Database authentication


you need to go for version 7.5 I have used this PowerShell script which Peter Prochazka explains in his blog post. I went with OpenJDK  and everything went smooth since no other Java version was present on the laptop

Running the script in an elevated powershell session the magic happen and I had Solr 7.5 up and running.

Sitecore Magic – SIA

this was the best surprise I can find… Graphical setup package for XP Single that you can download from

will do the boring job for you… In case you had installed Sitecore 9, you are aware of the long list of prerequisites to install (configure IIS, certificates, packages etc) SIA actually do 99% of it on your behalf, downloading and installing and setting all the prerequisites on your behalf…

The only parameters to provide to SIA will be the  SOLR url: https://solr75:8750/solr and sql instance name and credentials….


installing prerequisites quietly


fill in some settings such as instance name, admin pwd (I always put b…) and license file location


sql instance details… I recommend not to use sa account but a sql sysadmin account…


and finally