I'm trying to automate as much of our SharePoint builds as possible, but there is currently one part I'm getting hung up on.
Right now, my event log is filled with error 6398 and error 5586, which according to my Google-fu is rectified by enabling HEALTH data collection (not just usage).
I've examined the object returned by Get-SPUsageApplication, and the one returned by Get-SPUsageService. I've also tried looking at every cmdlet I can think of and the closest I can find for configuring anything to do with Health Collection is the trio of Get/Disable/Enable-SPHealthAnalysisRule.
I'd really like to believe that MS really wouldn't forget to add in a way to enable this without having to go through CA, but so far I haven't found it.
If there's a way to do it with stsadm I suppose that'll work for now.