Tip: Use Windows PowerShell 2.0 to Get Reliability Data from Remote PCs

Tips RSS Feed

Subscribe to the TechNet Magazine Tips RSS feed.

Windows Vista introduced Reliability Monitor, which accessed system stability data from the Reliability Analysis Component (RAC) database in a graphical manner. This tool allows IT professionals to view the system stability trend and associated events that may have affected that stability. In Windows 7, RAC database is accessible via WMI, enabling IT pros to view and use this data more flexibly.

Windows 7 includes Windows PowerShell 2.0, which provides remote scripting capabilities, including access to WMI. Combining these technologies, you can get the reliability data from user systems without having to physically visit their offices. Here are some handy commands:

Last 5 reliability event messages on a computer:

get-wmiobject Win32_ReliabilityRecords -computername -property Message | 
  select-object -first 5 Message | 
  format-list *

Distribution of reliability events:

get-wmiobject Win32_ReliabilityRecords -property @("SourceName", "EventIdentifier") | 
  group-object -property SourceName,EventIdentifier -noelement | 
  sort-object -descending Count | 
  select-object Count,Name |
  format-table *

The latest stability index for multiple machines:

@("USER-PC-1", "USER-PC-2") |
    foreach-object -process {
      get-wmiobject Win32_ReliabilityStabilityMetrics -computername $_ -property @("__SERVER", "SystemStabilityIndex") | 
      select-object -first 1 __SERVER,SystemStabilityIndex |

View a graphical display of the stability index:

get-wmiobject Win32_ReliabilityStabilityMetrics -property @("SystemStabilityIndex","EndMeasurementDate") | 
  foreach-object -process {
    $t = ""; 
    for ($i = 0; $i -le $_.SystemStabilityIndex * 5; $i++) { $t = $t + "=" }; 
    $_.EndMeasurementDate + " " + $t 

Tip provided by Jason Leznek, a Group Product Manager at Microsoft.

Looking for More Tips?

For more Windows 7 beta 1 tips, visit the TechNet Magazine Windows 7 beta 1 Tips page.

For more Tips on other products, visit the TechNet Magazine Tips index.