I accidentally found the ConfigMgr CMPivot favorite query option to save your favorite queries. I thought it’s useful to share here so that you don’t have to save the CMPivot queries in OneNote or some other place. CMPivot favorite option is helpful when you download the CMPivot query that is published in Community Hub.
I have explained how to download and start using the CMPivot query from the Community Hub in the following post. ConfigMgr CMPivot Query to Find Clients not Part of Any Boundary Groups | SCCM. But, I was a bit confused to understand where I can find the downloaded CMPivot query.
How to Save CMPivot Queries?
It’s interesting to know that once you download the CMPivot query from Community Hub, that query will get automatically added as CMPivot favorite query. Let’s see where is this favorite query icon in CMPivot.
- Launch the CMPivot tool from the console or standalone tool.
- Click on 📁🔍 the icon on the right-side corner of the CMPivot tool.
- You can see a list of queries in the following screenshot. Some of them are downloaded this query from Community Hub and others are manually saved.
- I have downloaded another query from Community Hub published by MVP colleague Panu Saukko.
- I have closed and reopened the CMPivot tool.
- Click on the CMPivot Favorite query icon (📁🔍).
- The Windows Cumulative Update CMPivot query is available under the Favorite query.
// Shows the pie chart of Windows 10/2016/2019 cumulative update versions OperatingSystem | project Device, BuildNumber | join (Registry('HKLM:\\Software\\Microsoft\\Windows NT\\CurrentVersion') | where Property =='UBR' | project Device, CU=Value) | project Device, FullBuild=strcat(BuildNumber,'.',tostring(CU)) | summarize count() by FullBuild | render piechart with(title='Windows CUs')
The SQL view vSMS_CMPivotFavorite gets you the details of all the CMPivot favorite queries of all the admins. So you might be able to see some interesting data from this view. Be careful if you want to keep your query a secret, even though I don’t recommend keeping this a secret.
You can run the following SQL query from SQL management studio to find out which are the favorite CMPivot queries of SCCM admins in your environment.
Select * from vSMS_CMPivotFavorite
The following table gives more information about CMPivot favorite query view.
|Script Guid||User Name||Name||Query|
|7DC6B6F1-E7F6-43C1-96E0-E1D16BC25C14||MEMCM\anoop||Shows when devices have restarted in the last seven days||OperatingSystem | where LastBootUpTime <= ago(7d) | summarize count() by bin(LastBootUpTime,1d) | render timechart|
|7DC6B6F1-E7F6-43C1-96E0-E1D16BC25C14||MEMCM\anoop||Clients without Boundary||CcmLog(‘LocationServices’) | where LogText contains ‘Client is not in any boundary group.’ | project Device, LogText, DateTime|
|7DC6B6F1-E7F6-43C1-96E0-E1D16BC25C14||MEMCM\anoop||Logical Disk per Device Chart||LogicalDisk | summarize sum( FreeSpace ) by Device | order by sum_ desc | render columnchart|
- Troubleshoot CMPivot
- Changes to CMPivot – Configuration Manager | Microsoft Docs
- ConfigMgr CMPivot Query to Find Clients not Part of Any Boundary Groups | SCCM