How to Sitecore 9 uninstall – my take

I have installed Sitecore 9 on a machine, but I needed also to clean up at one point.

There are already a couple of articles/references about this subject:

But I’ve decided to use Rob’s uninstall scripts referenced here in his introductory article about SIF-less, but in case you want to do it in a manual way, I wrote some steps below.

But also this process requires some extra assistance/adjustments as I am having the necessary SQL server installed on a different machine.

Before running the scripts that was generated by SIF-less, make sure to install SQL Server PowerShell Module by opening PowerShell as administrator by running this command:

Install-Module -Name SqlServer -AllowClobber

For more information look at this page that has the official documentation for installing the SQL Server PowerShell module.

Then copy the remove json files from the folder Scripts that comes with the the SIF-less archive into the folder for your XP0 Configuration files, defined by $PSScriptRoot in the install script and then copy the Invoke psm1 files from the folder Scripts that comes with the the SIF-less archive into the folder that has your uninstall script.

Extra: if Sitecore 9 was installed using a different folder than the default one, using instructions from here, then the removal scripts remove-sitecore-XP0.json or remove-xconnect-xp0.json have to be modified too, in similar way.

Manual way to uninstall an instance of Siteocre 9 involves few steps, but it is not that bad. Assuming that your installation instance is prefixed with xp0Demo then:

  • Remove the two xConnect windows services (with sc.exe delete [servicename] in poweshell as administrator or in cmd.exe as administrator too)
    • xp0Demo.xconnect-MarketingAutomationService
    • xp0Demo.xconnect-IndexWorker
  • Remove the Sitecore and xConnect website and application pools from IIS
  • Remove the Sitecore and xConnect webroots
  • Remove the databases from SQL Server prefixed with xp0Demo
  • Stop the Sorl service and remove the indexes prefiex with xp0Demo from folder c:\solr\solr-6.6.2\server\solr\. Do not forget to start the Solr service again.
  • Hosts entries that are prefixed with xp0Demo should be removed too

Also I’ve tested the procedure on a Sitecore 9 update 1 and its exactly the same, not changes required.

Sitecore 9 update 1 installation with SQL Server on a different server

Sitecore 9 update 1 was just released. So it’s quite fresh from the oven.

I’ve just tried the installation on a web machine that uses SQL Server installed on a different server and made some discoveries related with prerequisites  needed for the installation.

So beside the standard prerequisites mentioned in the installation documentation (must log into before downloading) there are couple requirements that have to be installed on your webserver:

    1. Microsoft SQL Server TransactSQLScriptDom – install both SqlDom.msi for x64 and x86 – install this before DacFx
    2. Microsoft Shared Management Objects for SQL Server 2016  – install both SharedManagementObjects.msi for x64 and x86
    3. Microsoft® SQL Server® 2016 Feature Pack
      1. Microsoft ODBC Drivers for Microsoft SQL Server – install both msodbcsql.msi for x64 and x86
      2. Microsoft Command Line Utilities 13 for SQL Server – install both MsSqlCmdLnUtils.msi for x64 and x86
    4. SQL Server PowerShell Module – by opening PowerShell as administrator and  run this command:
      Install-Module -Name SqlServer -AllowClobber
    5. Extra (so I find it later, even that is in the official documentation): Microsoft Visual C++ 2015 Redistributable – was introduced in this Sitecore 9 update 1 as its needed by ChilkatDotNet46.dll. Download from here.

I guess that’s all.

Happy installing and let me know if you need any assistance.

How to install Sitecore 9 on Windows 8.1

There are a couple of articles about Sitecore 9 on a Windows 8.1 development machine, and since it’s bit out of hand for me to upgrade to Windows 10 I’ve decided to take the bull by the horns and finally do it. Even that I’ve lost a bet with @SitecoreClimber that will manage to install Sitecore 9 to my Windows 8.1 in fist-second week of the launch without any troubles.

Windows 8.1 does not have Powershell 5.1 as its needed by SIF, so you can install it from here, as Windows Management Framework 5.1 includes also Powershell 5.1. An alternative way it to use this command choco install powershell if you are using Chocolatey.

After a restart of the machine it’s time to install Sitecore Install Framework and Sitecore Fundamentals. So in a Windows Powershell opened as Administrator execute this:

Register-PSRepository -Name SitecoreGallery -SourceLocation
Install-Module SitecoreInstallFramework
Update-Module SitecoreInstallFramework

Run the following command in Windows Powershell to validate the modules installed:

Get-Module SitecoreInstallFramework –ListAvailable

After this you can continue with the installation of SOLR. The script that Jeremy Davis made in his blog post it’s not going to work as New-SelfSignedCertificate has different parameters in Windows 8.1, so you could use my adjusted script.

After Solr its installed and up and running make sure than all the other prerequisites are meet:

  1. Sitecore License must have xDB enabled
  2. MS SQL Server 2016 SP1 or later
  3. MS SQL Management Studio
  4. .Net Framework 4.6.2 or later
  5. Web Deploy 3.6
  6. Java Runtime Environment
  7. Packages for XP Single (On Premises deployment)
  8. Microsoft SQL Server Data-Tier Application Framework (DAC Fx) (install both DacFramework.msi for x64 and x86)
  9. Microsoft SQL Server TransactSQLScriptDom (install both SqlDom.msi for x64 and x86)
  10. Extra step (added by me): Microsoft Shared Management Objects for SQL Server 2016 (install both SharedManagementObjects.msi for x64 and x86) since I do not have on my dev machine MS SQL Server 2016 SP1 or later or MS SQL Management Studio

Then make sure that you follow the changes to the scripts that Fabian is presenting here.

In short the changes are:

  1. Create a self-signed certificate in Windows 8.1
  2. Change xconnect-createcert.json
  3. Change the official installation script

Extra notes:

Note 1:

  • Make sure that the script New-SignedCertificateWindows81.ps1 is located in same place as the installation script so that can be picked up
  • Make sure that JRE bin folder does exist in the PATH Environment Variable, otherwise New-SignedCertificateWindows81.ps1 will not work.

In case you already have a SSL certificate in your machine then the changes that Fabian is presenting are not needed as you should use this article for installing your solution Sitecore 9 installation with existing SSL that I’ve wrote last week.

Note 2: The steps #8, #9 and #10 from the prerequisites should be installed in all situations when you install Sitecore 9 and you do not have on your web server MS SQL Server 2016 SP1 or later or MS SQL Management Studio

Note 3: On my way to install Sitecore 9 when I’ve installed only x64 version of add-ons from prerequisites ( steps #8, #9 and #10) and apparently was not enough as I was getting bunch of errors, so I had to install x86 versions too.

How to install Sitecore 9 with existing SSL certificate

You probably installed already Sitecore 9 on your environments following different blogs with necessary clarifications.

But, might happen that you already have a SSL certificate for your environments.

The affected places are:

  1. Installation of SolR
  2. Installation of Sitecore 9 itself

One of the places where SSL it’s needed its on the SolR instance. So by following the instructions from Jeremy Davis on this blog post I’ve adjusted his script in order to use an already existing certificate, where I’ve introduced a new variable

$solrNameSSL = "MySSLFriendlyName"

And then used this new variable $solrNameSSL in all places that have references to SSL instead of $solrName and adjusted the place where the code is searching for the certificate Cert:\Localmachine\My not only Cert:\Localmachine\Root.

The result script is here, but please do not forget to adjust necessary variables :

In the installation script of Sitecore 9 itself, some changes are required in order to use the already installed certificate.
One of the standard steps is to install a client certificate for xconnect, and that one has to be removed or at least commented out. This step usually looks like this:

#install client certificate for xconnect 
$certParams = @{     
	Path = "$PSScriptRoot\xconnect-createcert.json"     
	CertificateName = "$prefix.xconnect_client" 
Install-SitecoreConfiguration @certParams -Verbose 

I recommend to comment out only this line
Install-SitecoreConfiguration @certParams -Verbose
and in the  variable CertificateName that is defined above to put your certificate friendly name or the certificate thumbprint.

This will cover the client authentication certificate and next will be to make necessary changes for the server authentication certificate. The parameter that is called SSLCert has to be added in script part that deploys the xconnect instance, as follows:

#deploy xconnect instance
$xconnectParams = @{
 Path = "$PSScriptRoot\xconnect-xp0.json"
 Package = "$PSScriptRoot\Sitecore 9.0.0 rev. 171002
 LicenseFile = "$PSScriptRoot\license.xml"
 Sitename = $XConnectCollectionService
 XConnectCert = $certParams.CertificateName
 SSLCert = $certParams.CertificateName
 SqlDbPrefix = $prefix
 SqlServer = $SqlServer
 SqlAdminUser = $SqlAdminUser
 SqlAdminPassword = $SqlAdminPassword
 SolrCorePrefix = $prefix
 SolrURL = $SolrUrl
Install-SitecoreConfiguration @xconnectParams

That is needed because if is not provided a certificate will be generated automatically to be used use for the HTTPS web bindings of the xconnect website.

In the Oficial Installation guide in chapter 4.1 and chapter 8.1.1 there is more information about SSL requirements and where and how it’s used.


grunt build with compass fails on some environments, how I fix it

As I have mentioned in my first post here, I will write also about other things not only Sitecore, as in my daily work I do work with other things too.

So, let’s get into it.

Sometimes I need to build in my local environment the frontend project that my colleagues create in order to make small changes/adjustments or test the backend work much better.

And one some project, true, some old ones I was getting this error when building with grunt the project :

Warning: Running "compass:dist" (compass) task
Warning: not found: compass Use --force to continue.

I have tried many things on my environment to fix this and seems that a combination of things let to fix this problem, so now I can build old frontend projects:

  1. Un-install all versions of Ruby from the working computer
  2. Install latest version of Ruby into the Windows machine with the option “Add Ruby executable to your PATH” selected and then restart the computer
  3. Install Compass and Sass on your computer. Open command prompt and run the following commands:
      1. gem update --system
        gem install compass
        gem install sass
  4. Update compass in your project with this command from inside your project dir
      1. npm install grunt-contrib-compass --save-dev

I hope it works for you.

Good luck.