Serge van den Oever's weblog

Sitecore 9.3 - uninstall site installed with Sitecore Install Assistant

March 30, 2020 • ☕️ 2 min read
If you like my writing
Buy me a coffee when you like my writing!

There is a great post by Scott Gillis of The Code Attic, a Sitecore Technology MVP, where he provides a great uninstall script for SharePoint 9.3 sites installed with the Sitecore Install Assistant. The post has the humble name Sitecore 9.3 Uninstall Script, but it saved my life after some stupid mistakes like messing up my Sitecore installation and forgetting my admin password.

I had to do some, probably for most Sitecore devs obvious, steps that I will document here as my external memory, so I will not forget them:

  1. Open the Sitecore 9.3 Uninstall Script and read it!
  2. Open this file, press the Raw button, copy the contents and save it to a file named Sitecore-Uninstall-SIA.ps1 in a convenient place (in my case next to the Sitecore Install Assistant installation folder).
  3. Open a PowerShell shell
  4. The script depends on the SitecoreFundamentals PowerShell module which I did not have installed on my system. I installed it with the following commands:

    Register-PSRepository -Name sc-powershell -SourceLocation
    Install-Module -Name "SitecoreFundamentals" -RequiredVersion "1.1.0" -Repository "sc-powershell" -Force
  5. Get a list of installed sites using the following PowerShell command to search the history of sites installed with the Sitecore Install Assistant:

    Select-String -Path "$env:USERPROFILE\sitecore.installassistant\Sitecore-InstallConfiguration_*.txt" -Pattern "\[SitecoreXP0_CreateWebsite\]\:\[Create\] "

    Which in my case came back with:

  6. Run the uninstall script using .\Sitecore-Uninstall-SIA.ps1 to uninstall the latest installed Sitecore site, or with -SIALogFile "$env:USERPROFILE\sitecore.installassistant\Sitecore-InstallConfiguration_1585527079.txt" to uninstall a specific Sitecore site
  7. Have your SQLServer (localhost in my case), SqlAdminUser (sa in my case), and SqlAdminPassword ready, make sure you are uninstalling the right site and GO!

Please do this at your own risk:-)

Note that you can remove the SIA log file and corresponding files with the same number after you successfully removed your site. Don’t remove the remaining log files, you need them for new uninstalls.

Discuss on TwitterEdit on GitHub

Serge van den Oever's weblog

Serge van den Oever

Personal blog by Serge van den Oever - als je maar lol hebt...
Twitter: @svdoever
LinkedIn: Serge van den Oever - articles on LinkedIn

Technology Consultant @ Macaw
Competence Team Lead Custom Application Development @ Macaw
2022 Technology Sitecore Most Valuable Professional
2021 Technology Sitecore Most Valuable Professional

If you like my writing
Buy me a coffee when you like my writing!