How Do I get the data and time a workflow ran using PnP-PowerShell

%3CLINGO-SUB%20id%3D%22lingo-sub-1791863%22%20slang%3D%22en-US%22%3EHow%20Do%20I%20get%20the%20data%20and%20time%20a%20workflow%20ran%20using%20PnP-PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1791863%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20find%20when%20all%20of%20my%20SP2010%20workflows%20were%20run.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20a%20PnP-PowerShell%20script%20which%20goes%20round%20all%20of%20the%20site%20collections%2C%20sites%20and%20subsites%20looking%20for%20the%20workflows.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20now%20need%20to%20find%20when%20they%20were%20last%20run%2C%20again%20using%20the%20PnP-PowerShell.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERegards%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENigel%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1796806%22%20slang%3D%22en-US%22%3ERe%3A%20How%20Do%20I%20get%20the%20data%20and%20time%20a%20workflow%20ran%20using%20PnP-PowerShell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1796806%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F4102%22%20target%3D%22_blank%22%3E%40Nigel%20Price%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20can%20use%20the%20Powershell%20command%20below.%20Workflows%20will%20be%20listed%20by%20browsing%20all%20sub-sites.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgist.github.com%2Fjoerodgers%2Fcae8fcf81eb9ea84cabfadcb15cb5cf3%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgist.github.com%2Fjoerodgers%2Fcae8fcf81eb9ea84cabfadcb15cb5cf3%3C%2FA%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Contributor

Hi

 

I am trying to find when all of my SP2010 workflows were run.

 

I have a PnP-PowerShell script which goes round all of the site collections, sites and subsites looking for the workflows.

 

I now need to find when they were last run, again using the PnP-PowerShell.

 

Regards

 

Nigel

4 Replies

Hi @Nigel Price,

 

You can use the Powershell command below. Workflows will be listed by browsing all sub-sites.

 

https://gist.github.com/joerodgers/cae8fcf81eb9ea84cabfadcb15cb5cf3

 

Thank You @yunusemrearac - I will give it a try.

Hi @yunusemrearac 

 

Having looked at this a bit closer, How do I get the date and time the workflow last ran ?

 

Thanks

 

Nigel

Hi @Nigel Price 

 

You can using the last runtime for SharePoint Designer Workflow with this PowerShell Script.

 

https://gallery.technet.microsoft.com/office/How-get-the-workflow-7d00eed9