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.