Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Windows discovery using WMI fails with - Error evaling C:\Users\dnsadmin\AppData\Local\Temp\GenerateWMIScriptJS_WMI_FetchData6214298325369083622.js: Expected ';' - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Windows discovery using WMI fails with - Error evaling C:\Users\dnsadmin\AppData\Local\Temp\GenerateWMIScriptJS_WMI_FetchData6214298325369083622.js: Expected ';'
KB0814573

Windows discovery using WMI fails with - Error evaling C:\Users\dnsadmin\AppData\Local\Temp\GenerateWMIScriptJS_WMI_FetchData6214298325369083622.js: Expected ';'


1589 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

For a windows server discovery, if the MID server from which the discovery is being executed has the MID service account running with a 'logon account' that may have the right access to the target system, The WMI classify will still end up throwing the error message -

Error evaling C:\Users\dnsadmin\AppData\Local\Temp\GenerateWMIScriptJS_WMI_FetchData6214298325369083622.js: Expected ';'

Release

Expected to happen in NewYork base version and above.

Cause

This issue is caused because one of the MID server script files, "WMIRunner.js", is unable to handle an exception which in turn would be causing -Error evaling C:\Users\dnsadmin\AppData\Local\Temp\GenerateWMIScriptJS_WMI_FetchData6214298325369083622.js: Expected ';'

Resolution

To resolve the issue, please follow the below steps:

  1. Hop on to any instance which has the issue and for the MID server using which the windows discovery is being executed, you may see the property mid.use_powershell = false as the expectation is to trigger WMI remote command execution and not Powershell.
  2. Navigate to MID server-> MID server script files --> Take an XML back up of "WMIRunner.js" file already present and upload the XML(ecc_agent_script_file_b6fdf97bef65010098d5925495c0fb57 (1).xml ) attached to PRB1384070.
  3. Once done, restart the MID server service on the target host for the new WMIRunner.js to take effect.
  4. Post the restart, run discovery for a target host and it would be successful.

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.