Category: Sidekick

Automate Sitecore Content Synchronization using Sidekick PowerShell

  
Sitecore-Content-Sidekick-Powershell.png

I wanted to set up a daily Sitecore content synchronization to lower environments to ensure they are updated with the latest content from Production every morning.

The Sitecore Sidekick PowerShell module came to the rescue – Thank you Jeff Darchuk for the excellent module! One of its key advantages is that it eliminates the need to pass usernames or passwords for higher environments. 

https://github.com/JeffDarchuk/SitecoreSidekick?tab=readme-ov-file#scripting-sidekick

Installation:

Simply copy the Sidekick folder from the URL below and paste it into your PowerShell Modules on a Windows machine.

https://github.com/JeffDarchuk/SitecoreSidekick/tree/master/Scripting

Basically, it should reside in one of the paths found under $env:PSModulePath

Example: C:\Users\[USER]\Documents\WindowsPowerShell\Modules\SitecoreSidekick

P.S. I hope you have the Sidekick module installed, it needs a SharedSecret to communicate to the higher environments.

Content Sync:

After successfully installing the Sidekick PowerShell module, I created the following script to sync the Home page and its children from the Production environment to the QA environment.

 

Similarly, I created the following script for the Data folder on the SXA site, excluding the Sitewide Configuration item.

Scheduling:

With the scripts ready, I have scheduled both using Powershell Scripts Command to run every 12 hours to fetch items.

Sitecore-Sidekick-Content-Sync-Powershell.png

 

Sitecore-Sidekick-Content-Sync-Powershell-2.png

Hope this helps.

Happy Sitecoring!

0

Sitecore Sidekick Installation and Setup

Blog-Sitecore-Sidekick-Install-Setup.png

 

 

 

 

 

 

 

 

 

 

 

 

 

While working on a Sitecore 10.2.1 XM project, we relied on packaging content from upper environments or restoring the database to pull content locally, which was quite time-consuming.

The Sitecore Sidekick module (a big thanks to Jeff Darchuk) was a lifesaver for quickly pulling content into local or lower environments.

The latest Sidekick version is 1.7 and I was wondering which version will be compatible with Sitecore 10.2.1 and realized it doesn’t matter! 

Installation 

In NuGet, install the following modules in one of the Foundation projects or create a new helix module.

  • SitecoreSidekickFoundation
  • SitecoreSidekickContentMigrator
  • SitecoreSidekickCore
  • SitecoreSidekickAuditLog
  • SitecoreSidekickEditingContext

Sitecore-sidekick-install-download-content-migration-1.png

Note: You can skip AuditLog and EditingContext if don’t want it.

After installation, you will see the following DLLs in the bin folder

Sitecore-sidekick-install-download-content-migration-2.png

Configuration

  • Create a folder Sidekick under App_Config/Include in the Foundation layer.
  • Add the following Config files as it is, no changes are needed.

Sitecore-sidekick-install-download-content-migration-3.png

AuthenticationSecret – Generate a random GUID

Server List

<server desc="QA">https://[your_qa_cm_url]</server>

<server desc="QA">https://[your_qa_cm_url]</server>

<server desc="QA">https://[your_qa_cm_url]</server>

 

Publish the solution, now you will see Side Sidekick added to the menu bar!

Sitecore-sidekick-install-download-content-migration-4.png

Sitecore-sidekick-install-download-content-migration-5.png

 

Content Migrator

It is ready to pull content (make sure it’s deployed to higher environments)

Sitecore-sidekick-install-download-content-migration-6.png

 

Audit Log 

It’s quite helpful to review all content changes in graphic and detailed mode.

Sitecore-sidekick-install-download-content-migration-7.png

Sitecore-sidekick-install-download-content-migration-8-1.png

 

Editing Context

Quickly edit content without switching between databases using Editing Context.

Sitecore-sidekick-install-download-content-migration-9.png

References

  • https://jeffdarchuk.com/2016/10/24/sitecore-sidekick-content-migrator/
  • https://kamsar.net/index.php/category/Unicorn/

Hope this helps.

Happy Sitecoring!

1