#Requires -Version 2 #Win32_ReliabilityRecords introduced in Win7 #http://msdn.microsoft.com/en-us/library/ee706630%28v=vs.85%29.aspx Function Get-ReliablityRecords($computer, $limit) { if (!($computer)){$computer = "127.0.0.1"} if (!($limit)){$limit = 1000000} #This way of using ConvertToDateTime from RichMacs blog, #http://blogs.msdn.com/b/richmac/archive/2011/07/21/wmi-date-formats-powershell-to-the-rescue.aspx $TimeGenerated = @{Label=“Time Generated”; Expression={$_.ConvertToDateTime($_.TimeGenerated)}} get-wmiobject Win32_ReliabilityRecords -ComputerName $computer | select-object -first $limit ProductName, SourceName, User, $TimeGenerated, LogFile, RecordNumber, Message }