Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

How can I display a SP 2010 out of the box workflow's task assignees via powershell?

$
0
0

There are days where one of the 250+ workflows at the site has attempted to send email to someone no longer at the company.

I would like to find a way to go through the farm and display all the list URLs that have workflows, and the mail addresses associated to the workflows.

This way I can track down the workflows that need to be updated to remove the missing users.

I have started a bit of script to do this. In my script, I just had a site collection - I figured that if I can get that to work, then surely wrapping another loop for the rest of the farm won't be bad. 

However, for some reason, I am not seeing the output that I expected to show the mail addresses.

I am hoping a different set of eyes might see what I am missing. It was my understanding that the AssociationData property was XML that contained information about the assignees for tasks, the carbon copy list, etc.

Maybe I misunderstood something that I read?


$outLoc = "d:\temp\wfdata.txt"

$web = Get-SPWeb -Identity "http://myfarm/sites/it/"

foreach ($list in $web.Lists)
{
 $associationColl=$list.WorkflowAssociations
 
 foreach ($association in $associationColl)
 {
       $association.AssociationData | Out-File $outLoc
 }
}

$web.Dispose()

I want to thank you for the helpful tips that so often appear on this list. They help me when I am reading over old threads to figure out what to do. I am hoping that tips on this thread will likewise be helpful.


Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>