Still very new to Powershell.  I've adapted a script I found here to display information I want to see about workflows for a particular list.  That looks like this:

$siteURL="https://mydomain/sites/ericrules/"
$listName="Calendar"
$site=Get-SPSite $siteURL
$web=$site.RootWeb
$list=$web.Lists[$listName]
$wfManager=$site.WorkflowManager
$associationColl=$list.WorkflowAssociations
foreach($association in $associationColl)
{
write-host $association.ParentSite, "List:" $association.ParentList, "Name:" $association.Name, "Description:" $association.Description, "Manual:" $association.AllowManual,"On Create:" $association.AutoStartCreate, "On Change:" $association.AutoStartChange,"Created:" $association.Created, "Modified:" $association.Modified
}
$web.Dispose()
$site.Dispose()


How would I adapt and generalize this to start at a singular web application and iterate through all the site collections, sites and subsites, looking at every list and outputting that data?  If it was a nicely formatted text file with the quoted values as headers, that'd be ideal.  A CSV would work too.  

I'm still having difficulty figuring out all the for each looping going on.


Question: How do you pronounce "but"?
Answer: The word is similar to a and the (ā vs. ə and ðē vs. ðə).  The stressed bʌt tends to be used more when I am emphasizing that I am making a contrast:


  I would go, but  my parents won't let me. (whining teenager)


The unstressed bət is used more often when what I am saying is more important than the fact that there is a contrast:


  ...but I don't wanna go! (whining child)