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

Role required: pd_admin

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 Add a step button to add a step.

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.
    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.

Example

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.

Figure 1. WMI Query operation form

WMI Query usage

What to do next

cmdb-key-value
Discovery also collects cloud tags that are specific to each virtual machine (VM) and saves them to the Key Value [cmdb_key_value] table.