Start a workflow on all / specific items in a list.

Change the site and workflow names to suit your requirements. I included a condition in this script to only start the workflow on items where ‘Status’ is not equal to Complete. You can remove this condition if you wish to run the script on all items in the list.


Use a PowerShell script to start the workflow.

#Site and List  
$SPAssignment = Start-SPAssignment 
$web = Get-SPWeb "http://your-site" -AssignmentCollection $spAssignment 
$site = Get-SPSite ""
$listToCancel = "your-list";
$web.AllowUnsafeUpdates = $true;
#Output file
$Today = Get-Date -Format "dd-M-yy"
$outFile = "c:\CancelWorkflowScript-Log-$Today.txt"
#Workflows to Remove
$wfToStart= "Name of workflow"
#List Name  
$list = $web.Lists[$listToCancel]; 
#Workflow Manager
$association=$list.WorkFlowAssociations | where {$_.Name -eq $wfToStart}
$association.AllowAsyncManualStart = $true
$association.AllowManual = $true
# Iterate through all Items in List and all Workflows on Items.  
	#Filtered List
	Write-Host "Restarting workflows.."
	foreach ($item in $list.Items) { 
		if ($item["Status"] -ne "Completed") {
			Write-Output "$wftoStart started on " $item.Name | Out-File $outFile -Append
		else {
			Write-Output $item.Name " - is completed " | Out-File $outFile -Append
Write-Host Finished.

Note: Workflows started using via PowerShell like this do not trigger other workflows when they complete, even if you have other workflows set to automatically start on item change.