Posts

Showing posts with the label PowerShell

Set workflow for project templates using PowerShell

Image
Sitecore PowerShell is very powerful tool that helps in many kinds of tasks especially the repetitive tasks, in this blog I am sharing with you a small script that helps to add workflow to all Project templates $allItems = Get-ChildItem -path "/sitecore/templates/Project/{Your Project}" -Recurse  foreach($item in $allItems){     if($null -ne $item["__Default workflow"] -and $item.Name -eq "__Standard Values"){             Write-Host $item.Paths.FullPath             $item.Editing.BeginEdit()             $item["__Workflow"]=""             $item["__Default workflow"]="{Your Workflow ID}"             $item.Editing.EndEdit()     } }