Automating data collection with Powershell

One of the challenges with analyzing complex Exchange issues is data collection. Once the server goes into the failed state, any data collection at that point only shows us what the failed state looks like. It doesn't show us how it went from working to failing, and sometimes, that's what we need to see in order to solve the problem.