This post will show how to extend the SIFLess uninstall scripts for an instance that includes Sitecore Experience Commerce 9.
I have been playing around with Sitecore Experience Commerce 9 quite a bit lately. I was able to take part in the early access program and now with the general release I’ve installed and uninstalled it quite a few times. I have also been using SIFLess to install and uninstall Sitecore 9 base instances. Naturally, I felt the need to extend the uninstall scripts to include bits of Commerce that would otherwise be left over.
First, we need to create a new SIF (un)install JSON config file:
This script defines tasks to do the following:
- Remove Solr cores
- Remove Solr core files
- Remove websites
- Remove app pools
- Remove website files
- Remove databases
Next, we need to add a bit to our SIFLess-EZUnistall script to run our new config file through SIF.
I added this as the first uninstall step right after the variable declarations, but the order isn’t really that critical.