Get-WmiObject: Provider load failure

This topic contains 5 replies, has 3 voices, and was last updated by Profile photo of Richard Siddaway Richard Siddaway 1 year, 5 months ago.

  • Author
    Posts
  • #30230
    Profile photo of Tracy Hartzler
    Tracy Hartzler
    Participant

    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.

  • #30231
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    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

  • #30232
    Profile photo of Curtis Smith
    Curtis Smith
    Participant

    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 :
    
  • #30233
    Profile photo of Tracy Hartzler
    Tracy Hartzler
    Participant

    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

  • #30234
    Profile photo of Tracy Hartzler
    Tracy Hartzler
    Participant

    I would like to mark this as resolved but haven't quite figured out how to do that yet.

  • #30266
    Profile photo of Richard Siddaway
    Richard Siddaway
    Moderator

    Look at the thread status drop down box immediately above the Reply box

You must be logged in to reply to this topic.