Products: Nintex Workflow 2013
A common request we see is "How do I cancel/terminate a group of list item workflows that are in a state of 'Error Occurred'?" This article provides instructions on how to accomplish this.
Run the below (attached as well as a *.txt file for your convenience) PowerShell script (PowerShell ISE works well) from a SharePoint Server:
PowerShell Script |
---|
Add-PSSnapin Microsoft.SharePoint.Powershell -ErrorAction SilentlyContinue function Cancel-SPWorkflow(){ } function Get-SPWorkflow(){ } $(Get-SPWeb http://contoso.com).Lists["DocumentLibrary"].Items | Get-SPWorkflow | where {[String]$_.StatusText -match [String]"Error"} | Cancel-SPWorkflow |
To use the script, replace http://contoso.com and DocumentLibrary with the URL of the site and list title you wish to execute the script against.
For the Site Workflow version of this article go here: How to bulk cancel site workflows with a status of "Error Occurred"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.