I'm trying to delete in SharePoint 2013 the list of the Completed Workflows displayed at the bottom of the/workflow.aspx page. In SharePoint 2010 that was easily done with the PowerShell code below. However, in 2013 the code fails with $spitem.Workflows being empty? How do I go about deleting these Completed Workflows
in 2013? Thanks!
$spweb = Get-SPWeb http://sps-server/website
$splist = $spweb.Lists["YourList"]
$spitem = $splist.GetItemById(1)
$spitem.Workflows | % { $web.Site.WorkflowManager.RemoveWorkflowFromListItem($_) }