I'm using WMI to collect system information. It works fine on every system I've tested it on, but I have one or two users that are reporting problems. The debug logs show the WMI code is throwing a "Provider load failure" exception. I haven't been able to replicate the issue.
The users have verified that the WMI service is running in Automatic mode.
Here's the exception:
System.Management.ManagementException: Provider load failure
at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
Any thoughts on how to troubleshoot and resolve this issue?
One way to possibly track down the root cause of the issue is to use WBEMTest a tool that the MS Scripting Guys say is one of the easiest ways
"To find the provider of a WMI class..."
The Scripting Guys: Use PowerShell to Troubleshoot “Provider Load Failure”
The high level steps specific to the Win32_NetworkAdapter are described in this Win32_network adapter "provider load failure" post by Mark Wolzak at infoSupport.
Thanks to the WMI–Provider Load Failure post at Richard Siddaway's Blog for pointing me to this tool and specific methodology.
On operating systems with User Account Control turn off UAC.
In my case: Ross's answer about did not resolve. I could load some WMI providers (logicaldisk) but not others (IIS). WMI explorer tools (such as PowerGui) would show the provider. This suggested that security policy can prevent loading WMI providers. Once UAC was turned off all WMI providers loaded without error.
Of course, you might want to leave UAC on. I'll update this answer if I find the specific policies required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With