Scripting ALL the things!

with Sitecore Powershell Extensions

Very briefly about me

Alex Washtell

srs bsns:

lol jk:

Powershell Extensions

Brings the flexibility and productivity of Powershell into Sitecore

Available as a marketplace module

In development since 2012, now on version 3.3

Open source. Contributions welcome.

REALLY good. I mean, like, for reals.

Key development

Adam Najmanowicz

Michael West

Why use SPE?

Have you ever needed to execute a task in Sitecore such as:

  • Making a "small" change across a large number of items
  • Bulk renaming or moving items
  • Removing items that are no longer referenced
  • Producing a report of the oldest pages in the site
  • ... in Excel format?

How are you executing these tasks
in your Sitecore environments?

Is it via ASPX pages, tucked away in an admin folder?

Don't worry, we've all done it.

Perhaps via C# code,
but integrated into the Sitecore shell?

Better, but still requires boilerplate code
and a deployment

With SPE:

Create and manage tasks as Powershell
scripts, held in Sitecore items

Alongside an environment for executing them

With full Sitecore API and shell integration support

Accelerated delivery.

Reduced deployments.

Happy developer.

Powershell 101

Command-line shell and scripting language built on the .NET Framework

First released in 2009

Now pre-installed in all versions of Windows
and a core part of the OS.


Set-Location C:\My\Folder

Copy-Item MyFile.Txt -Destination c:\My\OtherFolder


Get-ChildItem C:\My\Folder | Copy-Item -Destination c:\My\OtherFolder

Get-ChildItem | 
    Where-Object { $_.LastWriteTime -lt (Get-Date).AddMonths(-1) } | 
    Sort-Object LastWriteTime


Get-ChildItem | 
    Where-Object { $_.LastWriteTime -lt (Get-Date).AddMonths(-1) } | 
    Sort-Object LastWriteTime

gci | ? { $_.LastWriteTime -lt (Get-Date).AddMonths(-1) } | sort LastWriteTime

Lots of other lovely stuff

  • Functions
  • Remoting
  • Background jobs
  • Modules
  • Supplied with ISE
  • Debugging


The Powershell runtime can be hosted
by any managed application.

Allows the Sitecore integration magic

Demos already, jeez.

Integration Points

Content Editor

- Context Menu

- Gutter

- Insert Item

- Ribbon

- Warning


Control Panel

Event Handlers

List View Actions

Page Editor Notifications


Logged In Pipeline

Logout Pipeline

Start Menu Reports



This is AMAZING!

Now where do I get it?


Search: sitecore powershell


Search: sitecore powershell gitbook

Sitecore Slack Group

Channel: #module-SPE


Absolutely welcome!

Gitbook includes full guide on how to
get the dev environment running

Join the Slack channel to collaborate