The PLA subsystem that you have been working with in this chapter has an additional kind of report that the PLA and PowerShell can generate, a System Diagnostic report. This report is simple to create and makes use of some of the approaches used in this chapter.
- Start the data collector on the local system:
$PerfReportName="System\System Diagnostics" $DataSet = New-Object -ComObject Pla.DataCollectorSet$DataSet.Query($PerfReportName,$null)$DataSet.Start($true)
- Wait for the data collector to finish:
Start-Sleep -Seconds $Dataset.Duration
- Get the report and view it:
$Dataset.Query($PerfReportName,$null)$PerfReport = $Dataset.LatestOutputLocation + "\Report.html"& $PerfReport