Thursday, August 22, 2013

Sitecore PowerShell Extensions Basic Usage

Basic run through on using the Console and ISE from within Sitecore.
# Get details on how to use the Get-Item command
Get-Help Get-Item
# Get the list of items under home and filter by creator
Get-ChildItem master:\content\home | Where-Object { $_."__Created By" -eq "sitecore\admin" }
# Get the list of Sitecore PowerShell Extension commands
Get-Command | Where-Object {$_.Implementingtype.FullName -match "Cognifide.PowerShell"} | 
    Select-Object -Property Name | Format-Table