Creating a system diagnostic report
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.
You use the
SRV1 server that you have used in other recipes in this chapter.
How to do it...
- 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 ...