This page looks best with JavaScript enabled

WMI query - incorrect namespace on Windows 2003 R2

 ·   ·  ☕ 1 min read

This article is a sequel to WMI Query - Incorrect Class on Windows 2003 R2?. It solves another common problem with WMI on Windows 2003 called Incorrect Namespace, occurring on most queries.

A simple way to diagnose it - go to Computer Management -> WMI Control -> Properties, chances are you will see many errors on the General tab.

Also, when you expand Security/Root, you will only see a couple of folders there, and CIMV2 is missing.

If this is the case, here is the solution:

cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer

A WMI browser window might open, related to unsupported parameters in one of the exe’s being ran. Just close that one, and run commands from the Incorrect Class solution (listed here for convenience):

rundll32 wbemupgd, RepairWMISetup
winmgmt /resyncperf
winmgmt /clearadap 

Victor Zakharov
WRITTEN BY
Victor Zakharov
Web Developer (Angular/.NET)