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.
Discovery Error - You cannot call a method on a null-valued expression. - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Discovery Error - You cannot call a method on a null-valued expression.
KB0723716

Discovery Error - You cannot call a method on a null-valued expression.


1524 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Issue

 


  • On executing discovery for Windows devices, it fails to classify the devices and throws an error.
  • The issue is about devices not getting classified. When discovery tries to discover a device, it throws a warning during classification steps and set the status of discovery to complete. This article will demonstrate on the investigations and probable use cases, hence in future, if discovery fails with the same error, then this can be one of the cause and worth trying to fix.

Steps to Reproduce


  • Connect to ServiceNow instance.
  • Initiate quick discovery or scheduled discovery for Windows devices.
  • validate the WMI Classify probe.

Error


  • Discovery fails to classify the device and throws the error as below

     Active, couldn't classify: No WMI connection, now finished - you cannot call a method on a null-valued expression.

Cause


  • Servicenow sends below query payload to fetch data as a part of WMI Classify step.
    <parameter name="WMI_FetchData" value="root\virtualization\v2\Msvm_ComputerSystem.Name,HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Domain,
    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Hostname,root\MSCluster\MSCluster_Resource.PrivateProperties,root\MSCluster\MSCluster_Resource.Name,
    root\MSCluster\MSCluster_Node.Name,root\MSCluster\MSCluster_Cluster.Name,root\MSCluster\MSCluster_ClusterToResource.GroupComponent,root\MSCluster\MSCluster_ClusterToResource.PartComponent,
    root\MSCluster\MSCluster_ClusterToNode.Antecedent,root\MSCluster\MSCluster_ClusterToNode.Dependent,root\virtualization\Msvm_ComputerSystem.Name,
    root\MSCluster\MSCluster_Resource.Type,Win32_ComputerSystem.Domain,Win32_ComputerSystem.Name,Win32_OperatingSystem.Caption,Win32_OperatingSystem.Version"/>


  • Below are the 2 parameters for which data the data is found to be missing under registry attributes. 
    HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Domain,
     KEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/Tcpip/Parameters/Hostname


  • Below screenshot shows the parameters.

Resolution


  • The missing values for the registry attribute are added for affected devices so that discovery can fetch the required data.
  • After making the change, discovery classifies the device successfully.

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?

Attachments

Attachments

  • Pasted image.png

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.