Skip to content

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

Description

@lukedaemon

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions