question

FranciscoAscencao-2881 avatar image
0 Votes"
FranciscoAscencao-2881 asked LimitlessTechnology-2700 answered

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

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
image.png (18.4 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

LimitlessTechnology-2700 avatar image
0 Votes"
LimitlessTechnology-2700 answered

Hello @FranciscoAscencao-2881

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://docs.microsoft.com/en-us/sysinternals/downloads/procmon

Hope this helps with your query,


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

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.