This topic contains 5 replies, has 3 voices, and was last updated by
September 29, 2015 at 11:21 am #30230
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.
September 29, 2015 at 11:31 am #30231ParticipantPoints: 0Rank: Member
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
September 29, 2015 at 11:35 am #30232ParticipantPoints: 0Rank: Member
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 :
September 29, 2015 at 12:28 pm #30233
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.
September 29, 2015 at 12:42 pm #30234
I would like to mark this as resolved but haven't quite figured out how to do that yet.
September 30, 2015 at 12:42 am #30266ParticipantPoints: 0Rank: Member
Look at the thread status drop down box immediately above the Reply box
The topic ‘Get-WmiObject: Provider load failure’ is closed to new replies.