Define a WMI query

As part of creating or modifying a 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.

      Or

    • Select the relevant identification or connection section for Service Mapping.
  2. Select the relevant pattern step or click to add a step.

Role required: pd_admin

Basic knowledge of programming is desirable.

About this task

This operation is relevant only for Windows.

Procedure

  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.
  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 the discovery process 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.

Example

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