The WMI protocol is used to discover and collect performance and health metrics from WMI-enabled devices. Agent-based and agentless WMI-enabled device discovery are supported.

Agent-based discovery

Agent-based discovery uses an Agent to discover remote WMI-enabled Windows devices.

Agent-based discovery prerequisites

  • Install an agent on a Windows server where it is used to discover other Windows servers.
  • Enable the WMI service on target devices.
  • Allow WMI service through the firewall.

Discover WMI-enabled devices using Agent

  1. Install the agent on one of your network Windows servers.

  2. Go to Setup > Resources > Management profile > Add.

  3. Enter a profile name and select:

    • Select Profile type as Agent
    • Select Device Type as Windows
  4. Click Submit.

    A master agent is a legacy concept and it is recommended that you not use an agent as a master agent.

  5. Go to Setup > Resources > Discovery deployment > Create New and:

    • Select Discovery Type as Agent.
    • Select Discovery Profile Type as WMI.
  6. Select credentials, specify the IPs you want to discover, and click Submit.

  7. Open the Discovery profile and click Scan.

All discovered devices are visible on the same page.

Agentless discovery

Agentless discovery uses a Windows gateway instead of an agent to discover WMI-enabled devices.

If any of the following are true, the gateway does not discover the device:

  • Port 5985 is not open.
  • An agent is installed on the devices.

Agentless discovery prerequisites

On gateway devices:

  • Enable WinRM services on the gateway.
  • Allow WinRM service through the firewall.
  • Add the target remote device IP addresses as trusted hosts on the gateway because discovery operates in the given IP range.
  • Enable PS-Remoting on the gateway device.
  • Make sure you can access PowerShell from the command prompt.

On target devices:

  • Enable WinRM service.
  • Allow WinRM service through the firewall.
  • Enable PS-Remoting.

Discover WMI-enabled devices using Windows Gateway

  1. Install the Windows gateway.

  2. Go to Setup > Resources > Management profile > Add.

  3. Enter a profile name and, select Profile type as Gateway.

  4. Click Submit.

  5. Register the gateway by following the instructions provided.

  6. Go to Setup > Resources > Discovery deployment > Create New and:

    • Select the Discovery Type as Gateway.
    • Select the gateway profile and Discovery Profile Type as WMI.
  7. Select credentials, specify the IPs you want to discover, and click Submit.

  8. Open the Discovery profile and click Scan.

  9. Manage the discovered Windows devices.

While creating a discovery profile, the Discover only WMI enabled devices option is displayed.

  • If you choose this option, only WMI-enabled devices are discovered.
  • If this option is not selected, the device is ping-able from the gateway, and WMI is not responding or does not exist, the device is onboarded as the Other device.
  • If the device is managed, the device is shown in the Infrastructure > Resources > Desktop/Server screen.
  • If the device is not managed, the device is shown in the Infrastructure > Resources > Discovered screen.

After discovery, the devices contain only IP Addresses and DNS Names. The DNS Name is queried using ReverseDnsLookUpManger and is displayed only if the IP Address is resolved.

Troubleshooting

How do you view and save discovered devices manually?

If you cannot view the discovered devices, follow these steps to view and save the discovered devices:

  1. Open a PowerShell window and navigate to the default discovery script location: C:\Program Files\OpsRamp\Gateway\scripts\wmi\discovery

  2. Enter the following command:

        .\scriptname <IPAddress> <domain\username> <password>
        

    Example:

        {{ .\windowsdiscovery.ps1 172.28.110.71 opsramp\admin Pass@123 }}
        

    This populates the console discovered device list.

  3. Enter the following command if you want to save the result in a file:

        .\windowsdiscovery.ps1 172.28.110.71 opsramp\admin Pass@123 > D:\result.txt
        

    Example:

        {{ .\windowsdiscovery.ps1 172.28.110.71 opsramp\admin Pass@123 > D:\result.txt }}
        

    In this example, the discovered device list is saved in the result.txt text file.

How do you troubleshoot remote connections?

To troubleshoot remote connections or debug environment-related permissions and authentication issues, see Microsoft documentation about remote troubleshooting.

External references