PowerShell version 2.
I have done some research to try and find out how to tell what classes Get-WmiObject supports but have not found any related articles.
Trying to get data using the following:
Get-WmiObject -class win32_reliabilityRecords -filter "sourcename = 'Microsoft-Windows-WindowsUpdateClient'"
The above returns:
Get-WmiObject : Provider load failure
At line:1 char:14
+ Get-WmiObject <<<< -Class win32_reliabilityRecords -filter "sourcename = 'Microsoft-Windows-WindowsUpdateClient'"
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
I can get data using the following:
$computer=Get-WmiObject -Class Win32_ComputerSystem
So I know Get-WmiObject works in general.
What version of Windows are you trying this on? I’ve just tested on Windows 10 and it works fine
According to the documentation for Win32_ReliabilityRecords https://msdn.microsoft.com/en-us/library/ee706630(v=vs.85).aspx this class is only available on Windows 7 and above.
PowerShell v2 was introduced with Windows 7 so you should be able to get access to that class.
If Get-WmiObject -Class Win32_ComputerSystem works then it suggests that your WMI repository isn’t corrupt.
What do you get if you try
Get-WmiObject -class win32_reliabilityRecords -List
I copy and pasted your command and it works flawlessly. I tested with both PowerShell version 2.0 and 4.0. Returned 138 objects on my system.
PS C:\> Get-WmiObject -class win32_reliabilityRecords -filter "sourcename = 'Microsoft-Windows-WindowsUpdateClient'" | m
easure
Count : 138
Average :
Sum :
Maximum :
Minimum :
Property :
Thanks for replying so quickly Richard and Curtis.
I was so excited to find a command that would provide me with what I needed and couldn’t get from Get-Hotfix that I completely glossed over the fact that the machine I am trying this out on is a Windows 2008 R2 server. Just another reason for us to move our Web servers to 2012 or beyond.
Regards,
-tracy
I would like to mark this as resolved but haven’t quite figured out how to do that yet.
Look at the thread status drop down box immediately above the Reply box