The PLA subsystem that you have been working with in this chapter has an additional system-defined report known as the System Diagnostic Report. This report monitors a system for a period then provides a detailed report on the server.
Start the built-in data collector on the local system, which generates the report:
$PerfReportName="System\System Diagnostics" $DataSet = New-Object -ComObject Pla.DataCollectorSet $DataSet.Query($PerfReportName,$null) $DataSet.Start($true)
Output a message, then wait for the data collector to finish:
"Sleeping for [$($Dataset.Duration)] seconds" Start-Sleep -Seconds $Dataset.Duration
Get the report and save it as HTML:
$Dataset.Query($PerfReportName,$null) $PerfReport = $Dataset.LatestOutputLocation + "\Report.html"
View the report:
& $PerfReport