Powershell Scripts to allow switching between CM and CD servers and between Lucene and Solr.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
includes
LICENSE
README.md
Sitecore_Switch_CM_CD_Lucene_Solr.ps1

README.md

Sitecore Server Switch

Powershell Scripts to allow switching between CM and CD servers and between Lucene and Solr. Files to switch are based on Sitecore's official documentation.

What's in the Box?

  • Sitecore_Switch_CM_CD_Lucene_Solr.ps1 script - Base script that swaps files for use in different server configurations.

  • includes Folder - Separate Powershell files that contains the file differences for different versions of Sitecore. See Supported Sitecore Versions for details.

How to Use this Module

Prerequisites

  1. Sitecore has already been installed. This script works best on a 'vanilla' instance of Sitecore. After the base install is complete, run this script to configure the server as a 'CM' or 'CD' server. (and to use Lucene or Solr)

  2. Ensure that you have the permissions set on the Website folder to allow modifications to the files. Failing to set permissions will result in "access is denied" errors.

Running the Script

Run the Sitecore_Switch_CM_CD_Lucene_Solr.ps1 Powershell script in Powershell or Powershell ISE. There are four parameters that are required:

  1. Sitecore version. Specify the version of Sitecore that you are working with:
Which version of Sitecore? 8.0 [1] | 8.2 rev 161221 (Update 2) [2]

Specify the number of the option you are using. In this example, "1" or "2"

  1. Folder path. Specify the path to your "Website" folder of your Sitecore instance.
Folder path the Sitecore instance \Website? (Ex: "D:\Sitecore\Dev-CD-SC8\Website\")
  1. Server type. Specify if you are configuring a CM or CD server.
Configure server to be [CM] or [CD]?

In this example, "CM" or "CD"

  1. Indexing technology.
Lucene [L] or Solr [S]?

In this example, "L" or "S"

Notes

  • Run the script and pay attention to the output. The script will inform you of all the files that were modified or not modified.

  • No attempt has been made to create any patch include files here. After running this script, you will still need to create your patch include files to modify any values in these files as required. (changing data folder location, setting Solr server, connection strings, etc)

  • No attempt has been made to harden the CD server. Please see Sitecore documentation for how to secure your CD server(s).

Troubleshooting

  • While attempting to run the script, you may encounter an error that states .\Sitecore_Switch_CM_CD_Lucene_Solr.ps1 : File C:\<Your File Path>\Sitecore_Switch_CM_CD_Lucene_Solr.ps1 cannot be loaded. The file C:\<Your File Path>\Sitecore_Switch_CM_CD_Lucene_Solr.ps1 is not digitally signed. YOu cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.

    To solve this issue, look at the properties of the Sitecore_Switch_CM_CD_Lucene_Solr.ps1 file (and all corresponding PowerShell scripts in the includes folder) and "Unblock" it.

Supported Sitecore Versions

More versions coming

Sitecore 8.2

  • Sitecore Experience Platform 8.2 rev. 161221 (8.2 Update-2)

Sitecore 8.0

  • Sitecore Experience Platform 8.0 rev. 151127 (8.0 Update-6)
  • Sitecore Experience Platform 8.0 rev. 150812 (8.0 Update-5)
  • Sitecore Experience Platform 8.0 rev. 150621 (8.0 Update-4)
  • Sitecore Experience Platform 8.0 rev. 150427 (8.0 Update-3)
  • Sitecore Experience Platform 8.0 rev. 150223 (8.0 Update-2)
  • Sitecore Experience Platform 8.0 rev. 150121 (8.0 Update-1)
  • Sitecore Experience Platform 8.0 rev. 141212 (8.0 Initial Release)

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Acknowledgments