WMI error executing "WMIC OS GET VERSION" in server W2012

Francisco Ascencao 1 Reputation point
2022-05-05T13:29:13.137+00:00

When i execute the comand WMIC OS GET VERSION

i get the error

"ERROR:
Description = ClassFactory cannot supply requested class"

but in graphical mode seems everything working

199217-image.png

Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
12,171 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,371 Reputation points
    2022-05-06T05:33:49.777+00:00

    Hello @Francisco Ascencao

    When the WMIC execution doesn't work, but the GUI works it is because a lack of permissions to access specific registry chains containing Classes with the information requested.

    In this case, you have 2 options:

    A) Open the command shell with different user, for example local Administrator.

    B) Download Process Monitor and check in real time which registry chains are being accessed when running the command and deliver the Access Denied type of error. Once detected, just need to adapt the permission settings of those registry chains to accommodate the authentication of the command. More details and download:
    https://learn.microsoft.com/en-us/sysinternals/downloads/procmon

    Hope this helps with your query,

    -----------

    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments