SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am writing a powershell script to find out all the In-Progress workflow instances in a site collection. Usually, the suggested way to do this is to find associated workflows to a list and check the status of the association. This saves from having to iterate through all list items.

BUT! I was able to find cases where I was running OOTB workflows (Feedback) on some list items - and they were never detected by the script. My only guess is that not all workflow instances necessarily have workflow association with the list. Could anyone shed some light into this for me please?

My PS pseudo-script:

 # For each site in site collection  
 # Get all Lists  
 # For each list  
 if (list.WorkflowAssociations.Count != 0)  
 foreach (SPWorkflowAssociation workflowAssociation in list.WorkflowAssociations)  
  # Get active workflows  
share|improve this question
Could these worklfows be against the content type rather than the list itself ? – Ian Apr 18 '12 at 7:06
up vote 1 down vote accepted

Check they're not content type workflows.

share|improve this answer
Thanks for the succinct answer. That helped. – Tom Apr 18 '12 at 19:37

Reusable Workflows can be associated with:

  • List
  • Content Type
  • Content Type in list

so apart from $list.WorkflowAssociations you also needs to look at $list.ContentTypes | % {$_.WorkflowAssociations}

share|improve this answer
Thank you for the answer. This worked. – Tom Apr 18 '12 at 19:36
Looks like I can only accept one answer :( – Tom Apr 18 '12 at 19:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.