Several hundred workflows have become stuck on 'Failed on Start (retrying)' and are causing the entire SharePoint environment to slow down.
NOTE: Users must update the list name in the last line from 'WorkflowTestingList' to the name of the affected list. This script will terminate *ALL* workflows on said list with the status of 'Failed on Start (retrying)'
- Identify the lists where these workflows have become stuck.
- Using the script below, target the affected lists, and then use the script to terminate the stuck instances: