Advanced Discovery Troubleshooting - WMI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-11-2010 07:42 PM
My friend in the BRK showed me this handy little way to help prove a WMI connection outside the midserver but using the same components asking the question. This can come in handy when you can't figure out why you are having problems connecting to a Windows OS and want to see the raw return before the "machine" starts processing it.
*As always be careful whenever stepping outside the controls of the UI, this process will have no more impact then a regular discovery but you want to be sure you have the necessary understanding of how scripting works, do this with an idle mid server application and the ability to understand the returns...have fun, this can be very helpful to prove where the problem lies...
1. RDP to Midserver host as the Midservers 'runs as' user
2. Open a command prompt and navigate to your midserver /agent folder
3. Create a script (test.js) with the necessary query you are trying to re-create, below is an example of a single command trying to pull back an Operating System value
var scanner = getScanner();
if (scanner) {
scanner.addFetch('Win32_OperatingSystem.Caption');
scanner.fetch();
}
4. After you save it, type and execute the line below
cscript lib\WMIRunner.js [IP of the target] test.js
5. Review results
Again, this can help with troubleshooting connecting to a machine for the first time or fixing a troublesome probe...Knowledge is power... enjoy
- Labels:
-
Discovery
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-27-2011 02:23 PM
I'm having the same issue with "Connection failed to WMI service. Error:" for about 98% of my workstations. This problem started happening within the last few months. I've verified that we don't have any firewall enabled (Windows or Trend), I can use scriptomatic on the MID server and get results from the workstations that are failed and I was also able to get info back from a failed workstation with the test.js script Doug listed above. Any ideas?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-29-2011 05:55 PM
Well it seems you might have a different problem.. Since your getting the info back from the test.js script and script-o-matic that proves the SN machine is pulling back info and your permissions are right... it might be the processing on the instance that might be a bit wacky...
If you can send me a PM or open an incident with support I'm sure we can work this out straight away!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-12-2015 11:47 AM
I am getting this error on several machines we have. Some of them have been discovered in the past but now started getting this same error. Nothing has changed on the machines that we are aware of.
One of the machines is a fellow Service-Now admin at my company. We have the exact same laptop with all the same software installed. Her laptop started getting this error message about two weeks ago, but mine is still discoverable just fine.
We are both part of the same domain and the account the MID servers are using are in the same domain using a Domain Admin account.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2013 08:12 AM
Well, I was hoping this would return me more than the same message the other people above got. "Connection failed to WMI service. Error: Permission denied"
I have ensured that my account has admin rights on all of our windows machines. Is there any way to ensure which user id the discovery process is trying to log into the machines with? I didn't know if at sometime maybe the affinity was messed up, or what. but about four months ago 100% of our windows machines abruptly stopped scanning (yes we just noticed it).
I don't have any other windows credentials set up under Credentials on discovery instance. I do have one but it is marked as inactive.
Any suggesitons? I'm kind of stumped.
EDIT: I thought it important to point out that the ONLY windows server that is being discovered, is, of course, my midserver.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2013 11:43 AM
This might help you.
http://msdn.microsoft.com/en-us/library/aa394559.aspx
Also, have you tried using Paessler's WMItester? http://www.paessler.com/tools/wmitester
Regards,
SHAUN BRACHMANN | Technical Analyst
Fruition Partners | 168 N Clinton, 6th Floor, Chicago, IL 60661
shaun.brachmann@fruitionpartners.com
fruitionpartners.com | ELEVATE SERVICE MANAGEMENT TO THE CLOUD