Skip to content

Instantly share code, notes, and snippets.

View akashdborkar's full-sized avatar

Akash Borkar akashdborkar

  • Perficient
  • Bengaluru
View GitHub Profile
@akashdborkar
akashdborkar / Snippets of SPE Commands WorkingWithRenderings
Last active May 12, 2025 07:14
Most widely used PowerShell SPE commands in Sitecore XM Cloud content migration.
#Get All Renderings for an Item. This script was used to analyze an item’s legacy renderings, map them with new XM cloud renderings (components), and map fields.
$item = Get-Item -Path $path -Version "latest"
$resultObj = @()
$defaultLayout = Get-LayoutDevice"Default"
Get-Rendering -Item $item -Device $defaultLayout -FinalLayout | ForEach{
$renderingItem = Get-Item -Path master: -ID $_.ItemID
$Obj = @{
RenderingName = $renderingItem.Name
@akashdborkar
akashdborkar / Export-SitecoreItemData.ps1
Last active May 14, 2025 08:19
A PowerShell script that uses Sitecore PowerShell Extensions to extract Sitecore items data to CSV and then use CSV to import data into Sitecore Items.
<#
.SYNOPSIS
Generic Page data extraction
.DESCRIPTION
Gets Sitecore Items from legacy database and extracts field values.
List could be exported to csv by OOTB feature of List View in SPE.
.NOTES
Akash Borkar