Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get-CimInstance : A general error occurred that is not covered by a more specific error code. #14

Open
lucafabbri365 opened this issue May 25, 2022 · 0 comments

Comments

@lucafabbri365
Copy link

lucafabbri365 commented May 25, 2022

Hello,
the Get-WindowsAUtoPilotInfo.ps1 PowerShell scripts returns the error below on computers with latest Windows Updates (May 2022); it seems the KB5013942 is causing it (links: Microsoft Q&A, Reddit).

Get-CimInstance : A general error occurred that is not covered by a more specific error code.
At C:\Program Files\WindowsPowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1:211 char:17
+ ... evDetail = (Get-CimInstance -CimSession $session -Namespace root/cimv ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Get-CimInstance], CimException
    + FullyQualifiedErrorId : MI RESULT 1,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand

C:\Program Files\WindowsPowerShell\Scripts\Get-WindowsAutoPilotInfo.ps1 : Unable to retrieve device hardware data (hash) from computer localhost

Removing the KB above resolves the issue, however on some environment it isn't possible (Windows says this is a required security update and cannot be removed).

On a deep investigation (WMI Explorer), it appears there is no Instance for the class MDM_DevDetail_Ext01 under root/cimv2/mdm/dmmap namespace, causing the error above.

Maybe you already know about it, and I also understand it isn't a script issue, but more a WMI related issue.

What are your thoughts ?

Thank you,
Luca

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant