Skip to content
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager

ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager

Written By Anoop C Nair
Last Updated August 20, 2024
Posted In SCCM
SHARE

Let’s discuss ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager. Let’s look at a ConfigMgr CMPivot query that Fetches the WSUS server Details of the Clients, which might help you troubleshoot software updates.

I have many blog posts related to CMPivot queries, and some of them are listed below. These posts explain how to start running CMPivot queries against Online clients.

CMPivot uses a subset of the Kusto Query Language (KQL). Microsoft Docs provides more details about KQL.

I don’t recommend using the All System collection in a production environment with many devices. Instead, use the collection with fewer devices to try out the query.

Patch My PC

Launching CMPivot Query Tool

Let’s understand how to launch the CMPivot query tool.

  • Navigate to the device collection against which you want to run the CMPivot query.
  • Select All Systems or any collection from which you want to run the CMPivot.
  • Right-click on the All Systems collection.
  • Select Start CMPivot.
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager - Fig.1
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager – Fig.1

Issues with CMPivot Query & Troubleshooting

I initially tried to get machines connected to a particular WSUS server using the CMPivot entity called CCMLog. However, the query didn’t work because of formatting issues.

Unfortunately, I couldn’t find a working CMPivot query. If you know how to use nested quotes (‘ ‘ ‘ ‘) in CMPivot, please let me know in the comments section.

The following query in KQL format didn’t work for me because the contains operator doesn’t support double quotes WSUS Path=’http://CMMEMCM.MEMCM.COM:8530”

CMPivot Query Error – Failed to parse the query.

CcmLog('LocationServices') | where LogText contains 'WSUS Path='http://CMMEMCM.MEMCM.COM:8530'' 
| project Device, LogText, DateTime

I also tried splitting the contains operator text into two parts, as shown in the query below, but that didn’t work.

CMPivot Query Error – The Left and right sides of the logical expression must be Boolean.

CcmLog('LocationServices') | where LogText contains (('WSUS Path=') and ('http://CMMEMCM.MEMCM.COM:8530')) 
| project Device, LogText, DateTime
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager - Fig.2
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager – Fig.2

ConfigMgr CMPivot Query to Fetch WSUS Server Details

Let’s check the query we will use to CMPivot Query to Fetch WSUS Server Details from all online clients. There is also another CMPivot query that can look for the clients connected to one particular WSUS/SUP server.

  • Check the query to find the clients connected to one WSUS/SUP server.
    • Make sure to update the following query with your WSUS server and port number that is in use.
CcmLog('LocationServices') | where LogText contains 'http://CMMEMCM.MEMCM.COM:8530'
| project Device, LogText, DateTime
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager - Fig.3
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager – Fig.3

Check the query to find the list of all ONLINE clients and their WSUS server details.

CcmLog('LocationServices') | where LogText contains 'WSUS Path=' 
| project Device, LogText, DateTime
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager - Fig.4
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager – Fig.4

Results

With the ConfigMgr mentioned above CMPivot query, you can check the WSUS server details, WSUS Catalog version, SUP Fall backup option details, and port number.

So, if you want to perform software update troubleshooting on problematic clients, you can use the CMPivot entity called CCMLog.

DeviceLogTextDateTime
Prod-Win20WSUS Path=’http://CMMEMCM.MEMCM.COM:8530′, Server=’CMMEMCM.MEMCM.COM’, Version=’27’, LocalityEx=’BOUNDARYGROUP’, SUPFallbackIn=’0′03-08-2021 12:22
Prod-Win20WSUS Path=’http://CMMEMCM.MEMCM.COM:8530′, Server=’CMMEMCM.MEMCM.COM’, Version=’27’, LocalityEx=’BOUNDARYGROUP’, SUPFallbackIn=’0′03-08-2021 12:22
Prod-Win20WSUS Path=’http://CMMEMCM.MEMCM.COM:8530′, Server=’CMMEMCM.MEMCM.COM’, Version=’27’, LocalityEx=’BOUNDARYGROUP’, SUPFallbackIn=’0′03-08-2021 12:22
Prod-Win20WSUS Path=’http://CMMEMCM.MEMCM.COM:8530′, Server=’CMMEMCM.MEMCM.COM’, Version=’27’, LocalityEx=’BOUNDARYGROUP’, SUPFallbackIn=’0′03-08-2021 12:22
Prod-Win20WSUS Path=’http://CMMEMCM.MEMCM.COM:8530′, Server=’CMMEMCM.MEMCM.COM’, Version=’27’, LocalityEx=’BOUNDARYGROUP’, SUPFallbackIn=’0′03-08-2021 12:22
ConfigMgr CMPivot Query to Fetch WSUS Server Details of the Clients | SCCM | Configuration Manager – Table.2

Resources

We are on WhatsApp now. To get the latest step-by-step guides, news, and updates, Join our Channel. Click here – HTMD WhatsApp.

Author

Anoop C Nair has been Microsoft MVP for 10 consecutive years from 2015 onwards. He is a Workplace Solution Architect with more than 22+ years of experience in Workplace technologies. He is a Blogger, Speaker, and Local User Group Community leader. His primary focus is on Device Management technologies like SCCM and Intune. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security, Career, etc.

Written by

Anoop C Nair is Workplace Technology solution architect with 25+ years of experience in global enterprise organizations such as JP Morgan, Capgemini, etc. Microsoft Certified Trainer. Microsoft MVP from 2015 onwards for consecutive 11+ years! He also conducts Intune and modern workplace tech training for enterprise organizations. He is Blogger, Speaker, and Founder of HTMD Community and HTMD Conference. His main focus is on Device Management technologies like Intune, Windows, Cloud PC. He writes about technologies like Intune, SCCM, Windows, Cloud PC, Windows, Entra, Microsoft Security.

Discussion

Join the discussion

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

Related guides

Intune

Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws

Key Takeaways Windows 11 KB5101650 KB5099414 July 2026 Patch and 3 Zero Day Vulnerabilities and 570 Flaws! In the July 2026 Patch, Microsoft introduced new features designed to improve the overall Windows experience. The update adds enhancements to Windows Update for more flexible update management and introduces Point-in-Time Restore, providing an additional recovery option for […]

AC Anoop C Nair 9 min read
Intune

2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws

Key Takeaways 2026 June KB5094126 KB5093998 Windows 11 Patch | 3 Zero Day Vulnerabilities and 200 Flaws! The June 2026 Windows 11 Patch Tuesday update brings several improvements to File Explorer. It adds support for additional archive formats, including UU, CPIO, XAR, and NuGet Packages (NUPKG). The update also preserves View and Sort preferences in […]

AC Anoop C Nair 10 min read
Intune

2026 May KB5089549 KB5087420 Windows 11 Patch | 0 Zero Day Vulnerabilities and 120 Flaws

Key Takeaways The Windows 11 May 2026 Patch KB5089549 KB5087420 Update brings important security fixes, performance improvements, and reliability enhancements across the operating system. The update introduces new features such as Xbox Mode for gaming, File Explorer improvements, enhanced input and sharing experiences, better taskbar and Windows Hello reliability, and additional enterprise management capabilities for […]

AC Anoop C Nair 8 min read
SCCM

ConfigMgr 2603 Introduces New Early Update Enrollment Process

Key Takeaways In this post we are discussing the ConfigMgr 2603 Introduces New Early Update Enrollment Process. Microsoft has officially released Configuration Manager version 2603 to the Early Update Ring, giving organizations an opportunity to test upcoming improvements before the global production rollout. The release is targeted at enterprises running ConfigMgr version 2409 or later […]

AC Anoop C Nair 3 min read