ConfigMgr: CMPivot in all its glory

CMPivot was first introduced in ConfigMgr CB 1806 and since its release, ConfigMgr as a product has became a little more real time. Especially when it comes to pulling deployment or compliance status. I must admit that I didn’t use CMPivot much earlier, but ever since remote working became the new normal, I started using CMPivot queries regularly and the more I used it, the more I found myself appreciating the efforts of the product team behind implementing this great feature.


If you manage your end user devices over the internet using Cloud Management Gateway (CMG), you would understand the pain of not being able to perform any remote administration tasks like checking the logs, or taking remote control etc. This is where CMPivot query can be really helpful.


According to Microsoft:-


CMPivot allows you to quickly assess the state of devices in your environment and take necessary actions. When you enter a query, CMPivot will run a query in real - time on all currently connected devices in the selected collection. The data returned can then be filtered, grouped, and refined to answer business questions, troubleshoot issues in your environment, or respond to security threats. CMPivot sends queries to clients using the Configuration Manager "fast channel". Clients return results via the similarly quick state message system. State messages are temporarily stored in the database.


Now the fun and interesting part


To run the CMPivot queries,

1. Connect to Configuration Manager Console and navigate to Assets & Compliance.

2. Select the device collection and either click the CMPivot from the menu ribbon or right click on the collection and select from there.

 



3. The CMPivot Window will show up to enter the query.

4. Select the query tab and Manually enter the query string.


Here are some examples that you can use.


For checking the installation status of an update –



For checking the uptime of the devices – 



For monitoring the status of IPU task sequence deployment over the internet -



For capturing the OS build number real time over the internet -



5. The pane on the left lists the Entities that are available on clients. Some entities rely upon WMI while others use PowerShell to get data from clients. You can right-click an entity for the following actions:

Insert: Add the entity to the query at the current cursor position. The query doesn't automatically run. This action is the default when you double-click an entity. Use this action when building a query.

Query all: Run a query for this entity including all properties. Use this action to quickly query for a single entity.

Query by device: Run a query for this entity and group the results. 

CMPivot uses subset of Kusto Query Language (KQL) and you can read all about it over here.

Conclusion

There are lot of Entities in CMPivot to work with and Microsoft are adding new regularly. There can be many other real time application of the queries, but for now I hope the above helps. I will update the post if I come across any more useful queries.


Until next time..

Comments

Popular posts from this blog

How to force escrowing of BitLocker recovery keys using Intune

Intune: Configure Printers for Non-Administrative Users

Intune: UAC Elevation Prompt Behavior for Standard Users