Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store

Define a WMI query

Define a WMI query

As part of creating or modifying a discovery pattern, you can use the WMI query operation to execute a query on a remote Windows system either explicitly or automatically. Successful values are logged in a specified target table.

Before you begin

Navigate to the relevant pattern step:

  1. On the pattern form, select the relevant identification section for Discovery.

    Alternatively, select the relevant identification or connection section for Service Mapping.

  2. Select the relevant pattern step or click to add a step.

Basic knowledge of programming is desirable.

Role required: pd_admin

About this task

This operation is relevant only for Windows.


  1. Select WMI Query from the Operation list.
  2. Define the namespace path in the Namespace field.
  3. If in the debug mode:
    1. Click Statement Accelerator to populate the table and field values automatically.
    2. Select a table from the Table name pane.
      The field values are displayed in the Fields pane.
    3. Define parameters and operators for the condition in the Add Condition Clause.
      The actual query text is displayed in the Get Full Statement.
  4. If not in the debug mode, enter the WMI query string in the Get Full Statement.
  5. Enter the variable for the table in which the retrieved data is saved in the Add Target Table field.
    You can enter a value from the specific field in a table as described in Enter values and variables in patterns.
  6. Select Use Cache to save the operation results in cache on the MID Server.
    Use cache to optimize discovery and avoid creating unnecessary load on central shared components, such as load balancers. The base system keeps operation results in cache for an hour.
  7. Select Terminate to stop discovery if no results are found.
  8. If in Debug mode, test the step by clicking Test and checking that the operation brings the result you expected.


This operation is used in This item
Hierarchy Applications > Directory Services
CI Type IIFP [cmdb_ci_directory_iifp]
Pattern IIFP On Windows Pattern
Section AD Home Forest connectivity stage-wmi
Step number and Name 1. Get all agents details via WMI step

This step uses the WMI Query operation to extract data on agents from the MicrosoftIdentityIntegrationAgent namespace and save this data in the variable table named $ManagementAgents.

Example of WMI Query usage

What to do next

Changes to site functionality will be made starting around 6am on January 21st (Pacific Time) and lasting approximately 6 hours.  The site may be intermittently unavailable.