SharePoint 2010 Delete completed workflow history in list item

I had a workflow creating a new version every 5 minutes for two weeks. This caused quite a big mess, and the story takes up a lot of space. I fixed the workflow, deleted the entire version history, and now I am removing items from the Process History list. The area I'm stuck in is the completed workflow history inside the list item. I do not have access to central administration, so I can not run the script to delete it. I have access to Designer. I tried to delete workflows and then publish them again, which did not delete the history. The list is currently 700 MB, with only 250 list items. There are no attachments in the list. Any suggestions on how to get to the completed history of the workflow will be greatly appreciated.

+4
source share
1 answer

You can easily do this with the object model and PowerShell:

$spweb = Get-SPWeb http://sps-server/website
$splist = $spweb.Lists["YourList"]
$spitem = $splist.GetItemById(1)
$spitem.Workflows | % { $web.Site.WorkflowManager.RemoveWorkflowFromListItem($_) }
+3
source

Source: https://habr.com/ru/post/1539014/


All Articles