Skip to main content
Nintex Community Menu Bar

Find all Workflows in farm by last run date

  • July 12, 2019
  • 4 replies
  • 381 views

Forum|alt.badge.img+1

Need to know which workflows are active in our farm(s), run in the last xx days. Ideally, a report listing each workflow, the collection and site it lives in, the workflow name, and last date run. I see lots of powershell to list workflows but do not see any to get last date run. 

4 replies

Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 15, 2019

Hi,

You could run a query on your content databases to get this information.

Select WorkflowName,MAX ([StartTime]) AS 'Last Started', SiteID, ListID, WebID
From dbo.WorkflowInstance
Group By WorkflowName, SiteID, ListID, WebID

Forum|alt.badge.img+9
  • July 15, 2019

Forum|alt.badge.img+1
  • Author
  • July 23, 2019

Thanks for the script. Do we know if this script collects all workflows, list and site, associated with a particular database? 


Simon Muntz
Nintex Partner
Forum|alt.badge.img+23
  • Nintex Partner
  • July 29, 2019
Hi,
The script I have provided is per database.
The script provided by mlauer will show every workflow in the environemnt from all databases.