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.