Here I have written a PowerShell script to find details of all workflows associated with all lists in Site Collection.
$url = “http://contoso.com”
$spSite = new-object Microsoft.SharePoint.SPSite($url)
foreach($web in $spSite.AllWebs)
foreach($list in $web.Lists)
foreach($wf in $list.WorkflowAssociations)
Write-Host “$($list.Title)” -foreground White
Write-Host “$($wf.Name)” -foreground Green
This script provides details on workflow associated with list, once we get the information about workflow, we can execute other commands as required.
for queries, suggestions, feedback contact me on