Use CMPivot Query to find VMware Devices in SCCM

In this post, I will show you how you can use a CMPivot query to find VMware devices in SCCM. To find the count of all the existing VMware virtual machines in your setup, you can run a simple CMPivot query.

A VMware device is a virtual machine that is either installed with Windows client OS or Windows Server OS. When you install SCCM client on a VM, you manage the VM through Configuration Manager.

In any large organization, you will find a mix of physical servers and virtual machines. Finding out the virtual machines will be a tedious task. However, CMPivot query can quickly help you find all the VMware virtual machines in SCCM.

PatchMyPC HorizontalAD
Patch My PC Sponsored AD

CMPivot is a new in-console utility in SCCM that now provides access to the real-time state of devices in your environment. CMPivot’s KQL-based queries make it easier for administrators to find important data from the clients. All these CMPivot queries can be safely run on the ConfigMgr production server, and you can also export the results or output to a file.

With CMPivot, you can run some basic queries to check the antimalware status on a single computer or on an entire SCCM device collection. If you don’t use Configuration Manager, you have to find the virtual machines in the setup by manually checking the manufacturer of the device.

I’ve been experimenting with CMPivot queries for a while now, and I find it to be incredibly fascinating. The amount of information that you can gather from remote machines is simply outstanding. If you are interested in exploring CMPivot, you can check out all my posts on ConfigMgr CMPivot queries.

Take a look at some interesting CMPivot queries that you can use in SCCM:

Use CMPivot Query to find VMware Devices in SCCM

Perform the following steps to find all the VMware devices in SCCM using CMPivot query:

  • Launch the SCCM console.
  • Go to Assets and Compliance > Overview > Device Collections.
  • Select the device collection against which you want to run the CMPivot query.
  • Right-click the device collection and select Start CMPivot.
Use CMPivot Query to find VMware Devices in SCCM
Use CMPivot Query to find VMware Devices in SCCM

In the CMPivot window, switch to the Query tab and enter the below query. The CMPivot query below will find all devices whose manufacturer is VMware.

Device | where Manufacturer == 'VMware, Inc.'

The CMPivot output will include all the devices whose manufacturer is VMware. In addition, the output will also include the model number, domain and username logged in to the VMware device. These are the virtual machines that are currently hosted in my lab setup and VMware model is 20.1.

Use CMPivot Query to find VMware Devices in SCCM
Use CMPivot Query to find VMware Devices in SCCM

Running the same CMPivot query in a large organization shows several machines that are virtual machines. We also see the model here which is VMware 7.1.

Use CMPivot Query to find VMware Devices in SCCM
Use CMPivot Query to find VMware Devices in SCCM

I hope you now have a fair idea on how to use CMPivot query to find VMware devices in SCCM. For more such useful CMPivot queries, do check out my other blog posts.

Leave a Reply

Your email address will not be published. Required fields are marked *