How to check whether any workflow is associated to any list? RRS feed

  • Question

  • Hi All

    I have a sharepoint site which is containing more than 50 list.. I need to check whether any list is associated with any workflows.

    Is there any easy way to check it easily instead of checking each list. thanx in advance.


    manikandan C

    Thursday, May 4, 2017 6:24 AM

All replies

  • Use Below Powershell Script to Check and Get Workflow association with list...

    $siteURL="<Site URL>"
    $site=Get-SPSite $siteURL
    foreach($list in $listCollections)
    if($list.WorkflowAssociations.count -gt 0)
    write-host $list.WorkflowAssociations.count'  '$list;

    using Server Object Model...

     using (SPSite site = new SPSite("<Site URL>"))
                    using(SPWeb web = site.OpenWeb()){
                        SPListCollection listCollection = web.Lists;
                        foreach(SPList list in listCollection){
                            if(list.WorkflowAssociations.Count >0)
                                MessageBox.Show("List Name and Workflow Name"+list.Title+"  "+list.WorkflowAssociations.Name);

    • Edited by Dillibabub Thursday, May 4, 2017 9:10 AM
    Thursday, May 4, 2017 9:09 AM