WMI allows you to work wonders with your network, but if it is not configured perfectly, everything can come crashing down. To get the most out of Spiceworks, we need to troubleshoot these WMI problems and get your Windows computers properly recognized.
Can't Connect To Remote Computer
When Spiceworks can't connect to a computer, it returns this error. This could be because of WMI or it could be a couple of other things.
- Sometimes the most obvious explanation is the right one. Maybe the computer is just not online. If this is the case, you're obviously not going to be able to connect through WMI. Check that the computer is online by trying to ping the remote machine, or by using a command-line or GUI tool.
- You might not have administrator rights on the remote computer. It could be possible that the account you are using to access the remote machine is a "regular" user account and not an administrator account.
- It's possible to be granted access to WMI namespace even if you aren't a local administrator.
- You can check this by right-clicking the My Computer icon and clicking on Manage. Select Services and Applications, right-click WMI Control and select Properties. You can then find the information you're looking for in the Security tab.
- A firewall could be blocking your access to the remote computer. WMI uses DCOM and RPC (Remote Procedure Call) protocols to communicate across your network. Many firewalls block these protocols by default. Every firewall has a different method to change what gets through. Check out this link for some tips.
- The WMI versions of the remote computer and your computer may be incompatible. If the computer you are using is running Windows XP or Server 2003 (or later), this shouldn't be an issue. However, if you are using an older version of Windows, such as Windows 2000 SP1, you might not be able to communicate with a newer operating system without an upgrade.
WMI Is Misconfigured On The Machine In Question
WMI must be configured properly in order for Spiceworks to gather information. After you select the device that was classified as unknown, you may see an error similar to the following:
Windows Exception: WIN32OLE Runtime Error: Connect Server OLE error code: 80070002 in SWbem Locator The system cannot find the file specified. HRESULT error code: 0x80020009 Exception occurred.
If you are not sure if WMI is configured properly on the machine in question, try the following (from Microsoft): Microsoft WMI Diagnostic & Repair Utility.
Additionally you can try the following command from the machine with the Spiceworks Desktop loaded. Where you are using username and yourpassword to access the remotemachine.
c:\ wmic /user:username /password:yourpassword /node:remotemachine systemenclosure get serialnumber
You should get some results that look like:
Serial Number 2iduekfj45ufh (the actual serial number from remotemachine)
If you are getting an "Invalid Global Switch" error, it's probably because the computer name contains a hyphen. In this case, you'll need to enclose the computer name in double quotation marks, i.e. ""Marks-pc""
Account Doesn't Have WMI Access
WMI might be failing due to the fact that the remote machine (the one showing up as an unknown in Spiceworks) is not allowing the account (or group) WMI access. To verify this (on the remote machine) simply:
- Click Control Panel
- Click Administrative Tools
- Click Computer Management
- Click Services & Applications
- Click WMI Control
- Right Click Properties
- Select Security TAB
- Select Root
- Select Security Button at the Bottom (verify your username (group) is allowed permission)
- Typically you will want at least to have the ADMINISTRATOR GROUP included in this list
Is DCOM Disabled?
Because WMI uses DCOM protocol to connect to other machines, if DCOM is not enabled, WMI will not be able to connect.
- Check this key on the remote machine: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Ole,EnableDCOM
If it returns N, you need to switch to Y and reboot. You can also do this through the Component Services MMC.
- Clean out WMI with this batch job:
net stop winmgmt /y c: cd %windir%\system32\wbem if exist %windir%\system32\wbem\repository.old rmdir /s /q repository.old rename %windir%\system32\wbem\repository repository.old for /f%%s in (' dir /b *.dll' ) do regsvr32 /s %s net start winmgmt wmiprvse /regserver
DCOM Configured Incorrectly
WMI might be failing due to DCOM being configured in a manner that doesn't allow remote applications to run (namely the WMI application). You must have DCOM configued (on the remote computer that is being accessed) to allow remote launch and remote activation. Type this in a command window:
- Click Component Services
- Click Computers
- Right-click My Computer
- Click on the Default Properties tab
- Check "Enable Distributed COM on this computer"
- Default Authentication Level: Connect
- Default Impersonation Level: Identify
- Click on COM Security tab
- Click Edit Limits under "Launch and Acitvate Permissions"
- Make sure Remote Launch and Activation permissions are enabled for the Username you are using
Verify that the username (and group) you are using to access the remote machine have both local and remote (activation and launch) capabilities enabled (all 4 boxes should be checked). If DCOM is what is causing the problem, you will typically get an "Authentication Error" from the WMIC command above. If you are getting an "RPC Server Unavailable" error, it is likely that a firewall is blocking access completely (see below) **Restart computer for changes to take effect**.
Enabling Remote WMI On Windows NT 4.0
If you don't want to have Spiceworks auto-find (by scanning) all your devices, you can always just manually add a device on your own by going to the User Defined area in the application and creating an asset/device that is custom.
Unfortunately Windows NT 4.0 does not have WMI enabled by default. You can enable it by following these steps:
- Install WMI for Windows NT 4.0 from Microsoft.com
- Enable Remote WMI by running dcomcnfg.exe
- On the Default Properties tab, select Enable Distributed COM on this computer
- Set Default Authentication Level to Connect
- Set Default Impersonation Level to Impersonate
Pushing Out WMI Changes Through Group Policy
Check out these instructions for help getting the changes pushed out through Group Policy:http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/84c78946-eb05-4068-877d-489153419d13/