WMI Notes

I have spent too much time trying to fix WMI. Here are my notes. Sometimes nothing works and the only recourse is to rebuild the machine.

Step 1. DCOM permission

  1. Open Dcomcnfg
  2. Expand Component Service -> Computers -> My computer
  3. Go to the properties of My Computer
  4. Select the COM Security Tab
  5. Click on "Edit Limits" under Access Permissions, and ensure "Everyone" user group has "Local Access" and "Remote Access" permission.
  6. Click on the "Edit Limit" for the launch and activation permissions, and ensure "Everyone" user group has "Local Activation" and "Local Launch" permission.
  7. Highlight "DCOM Config" node, and right click "Windows Management and Instruments", and click Properties.

Step 2. Permission for the user to the WMI namespace

  1. Open WMImgmt.msc
  2. Go to the Properties of WMI Control
  3. Go to the Security Tab
  4. Select "Root" and open "Security"
  5. Ensure "Authenticated Users" has "Execute Methods", "Provider Right" and "Enable Account" right; ensure Administrators has all permission.

Step 3. Verify WMI Impersonation Rights

  1. Click Start, click Run, type gpedit.msc, and then clickOK.
  2. Under Local Computer Policy, expand Computer Configuration, and then expand Windows Settings.
  3. Expand Security Settings, expand Local Policies, and then click User Rights Assignment.
  4. Verify that the SERVICE account is specifically granted Impersonate a client after authentication rights.

 

WMI Repair - Windows XP

c:\windows\system32\rundll32.exe wbemupgd, UpgradeRepository

Windows Server 2003

c:\windows\system32\rundll32.exe wbemupgd, RepairWMISetup

Windows 2008 or Win 7

c:\windows\SysWOW64\wbem\winmgmt.exe /salvagerepository

 

Testing WMI

wbemtest

connect to root\cimv2

enter query select * from win32_operatingsystem

From powershell

gwmi win32_operatingsystem –computername nameofcomputer

 

WMI Repair - Windows 7 or Server 2008

Ensure that the Windows Management Instrumentation (WMI) service is running on this computer.

Ensure that the Remote Procedure Call (RPC) service is running on this computer.

Ensure that the WMI Repository is consistent on the computer

Ensure that DCOM is enabled

To test:

On machine run wbemtest.ex e

Connect to root\cimv2

Entery query select * from win32_operatingsystem

Remote test

From powershell prompt

Gwmi win32_operatingsystem –computername nameofcomputer

WMI Repail - Server 2003

Ensure that the Windows Management Instrumentation (WMI) service is running on this computer.

Ensure that the Remote Procedure Call (RPC) service is running on this computer.

Ensure that the WMI Repository is consistent on the computer

To test:

On machine run wbemtest.exe

Connect to root\cimv2

Entery query select * from win32_operatingsystem

Remote test

From powershell prompt

Gwmi win32_operatingsystem –computername nameofcomputer