How to revert a Sitecore hotfix in seconds

Continuing with my earlier blog article of installing a Sitecore hotfix, this one reverts the hotfix. It uses the original scwdp file to revert to old state of the corresponding dll. This script just needs the hotfix zip placed in same folder as the script then during execution, provide site prefix as param. Would download the scwdp file from SDN, if not present. Provides a base code to easily customise for other topologies. 

Unzips the hotfix file and checks if each of the files is present in the instance, removes the same. Then, opens the scwdp file and copies over the corresponding file, if present.

If zips are downloaded and expanded, smart enough to bypass operations and reduce execution time in further runs.





Run in PS prompt as follows: 

.\Revert_Hotfix_Script.ps1 -SitePrefix "sc103lkg"




Pre-requisites:
- Stop the 3 services - xConnect, ProcessingEngine and MA before execution
- Stop the IIS instances too


Testing:
- Tested to revert only one hotfix file so don't copy over multiple hotfix files in the folder
- Tested to revert 10.3.1 XP0 Cumulative hotfix back to 10.3.0 state

Github Link

Comments

Popular Posts