Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

PowerShell to Cancel SharePoint Online Workflow for Document Library

$
0
0

We have a SharePoint Online document library with a workflow name "TestWorkflow" and few hundred documents are running this workflow.  I need to cancel all running workflow with "TestWorkflow" column show "In Progress".  We need PowerShell to run and cancel all the workflow with above criteria.

I found few articles using PowerShell using CSOM to cancel workflow

1. https://www.sharepointdiary.com/2018/05/sharepoint-online-terminate-workflow-using-powershell.html

2. http://abhilashjourney.blogspot.com/2016/10/cancel-workflow-for-particular-list.html

3. https://en.rapidcircle.com/news/powershell-terminate-a-workflow-for-all-items-in-a-list-on-sharepoint-online

4. https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f6067af2-8cd0-42e3-a8b9-639cd38d433f/stop-all-the-running-workflows-on-a-list-using-spservices?forum=sharepointcustomizationlegacy

dfds

For some reasons, all above article code does not work for current SharePoint Online 2019.  My SharePoint online document library have 3 records and when the PowerShell code run, it show no workflow found and hence did not cancel any workflow where it "In Progress".

Please help.

Thanks

Tee


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>