Skip to content
Check WinRM Security Event ID Details using SCCM CMPivot

Check WinRM Security Event ID Details using SCCM CMPivot

Written By Anoop C Nair
Last Updated July 27, 2022
Posted In SCCM
SHARE

Let’s check WinRM Security Event ID Details using SCCM CMPivot. You can use this method to collect the details of the Windows devices based on Event IDs. Windows added additional details to WinRM event logs. More details are below.

After July Cumulative Updates (KB5015807 and KB5015814), it adds IP address auditing for incoming Windows Remote Management (WinRM) connections in security event 4262 and WinRM event 91.

You can also use CMPivot to query the registry entries on Windows servers and client operating systems. The CMPivot gives you almost live data of the online SCCM clients. So there is no delay, unlike other reporting methods.

CMPivot is the subset of the KQL query language that is used in Azure log analytics. You can also use the Intune portal to check the registry checks using the CMPivot query if you have already enabled the SCCM Cloud (tenant) attach feature.

Patch My PC

WinRM Event ID Details

You can get the WinRM Event ID Details from the Event Viewer. You can use the following path to get the Event ID details using CMPivot. But there is a catch! More details are available in the below section.

  • WinRM Event Logs: Microsoft – Windows – Windows Remote Management
Check WinRM Security Event ID Details using SCCM CMPivot 1
Check WinRM Security Event ID Details using SCCM CMPivot 1

Security Event ID Details

Let’s check how to collect the Security Event ID details using SCCM CMPivot and list down or get the count of devices having a particular security event log. Again, you need to make some adjustments in the CMPivot query to get this working. More details are below.

  • Security Event Logs: Windows Logs -> Security

Prerequisite for SCCM CMPivot

Ensure you are running the latest version of the SCCM client and CMPivot (SCCM console). Appropriate SCCM security permissions are required to run CMPivot.

Also, SCCM client devices should require PowerShell version 4.0. The Start CMPivot action doesn’t appear in the console when connected to an SCCM CAS site.

Launch CMPivot to Check WinRM Event ID Details

There are different methods to launch CMPivot. The in-console CMPivot method is explained in this post. However, there are other methods as well, such as:

Let’s check WinRM Event ID Details using SCCM CMPivot. Always use the smallest device collection as the first step for initial testing. This will help to understand whether the CMPivot query is working as expected or not.

  • Navigate to the Device Collections against which you want to run the CMPivot query to review the BitLocker Management event logs.
  • Select any one of the device collections as per your requirement.
  • Right-Click on Device collection.
  • Select Start CMPivot.
Check WinRM Security Event ID Details using SCCM CMPivot 2
Check WinRM Security Event ID Details using SCCM CMPivot 2

WinEvent Vs. EventLog

Let’s understand which CMPivot entity should be used to get the event log details. I see there are some differences, as listed down in the below table, between both entities.

I use WinEvent for checking the Microsoft Windows related events. The Winevent is specifically for windows events, and EventLog is more generic and even can be used for 3rd party app event logs.

CMPivot Entity NameDescriptionProperties
WinEventEvents from a Windows event logDevice
LevelDisplayName
DateTime
Message
ProviderName
ID
EventLogEvents from an Event logDevice
Entry Type
DateTime
Message
Source
EventID
Check WinRM Security Event ID Details using SCCM CMPivot – Table 1
Check WinRM Security Event ID Details using SCCM CMPivot 3
Check WinRM Security Event ID Details using SCCM CMPivot 3

Check WinRM Event ID Details using SCCM CMPivot

Let’s try to use Windows Remote Management (WinRM) events to track the devices with some errors or with specific event IDs etc. But you must be careful with the CMPivot query, as explained below.

The following is the WinRM Event Logs path: Microsoft – Windows – Windows Remote Management. The question is how to convert this event log path into the CMPivot query event log path.

Wait, Microsoft-Windows-Windows Remote Management/Operational -> this is not going to work! Because Windows Remote Management is not the actual name of the event log path. You must use WinRM instead, as shown below.

  • Click on the Query Tab from the CMPivot application/tool.
  • Paste the WinRM CMPivot Query to the “query” window.
    • The following query gives the list of all WinRM events for the last 2 hours.
  • Click on the Run Query button and wait for it to complete the execution of the query.
WinEvent('Microsoft-Windows-WinRM/Operational', 2h)

CMPivot query takes a long time to complete if you are running against a larger collection. So hold your horses and test your CMPivot queries with smaller collections first or run against a particular device.

Check WinRM Security Event ID Details using SCCM CMPivot 3
Check WinRM Security Event ID Details using SCCM CMPivot 3

As explained below, you can expand or filter down the query to get the exact details or count of devices with a particular error. With the below query, let’s check the WinRM error code 2150858770. This CMPivot query will return the device details with the error code within the last hour (1h).

WinEvent('Microsoft-Windows-WinRM/Operational', 1h) | where Message contains 'error code 2150858770'
Check WinRM Security Event ID Details using SCCM CMPivot 5
Check WinRM Security Event ID Details using SCCM CMPivot 5

You can also fetch the high-level count of errors per device with any particular WinRM error or message using the SCCM CMPivot query shared below.

WinEvent('Microsoft-Windows-WinRM/Operational') | 
summarize countif( (Message contains 'error code 2150858770') ) by Device | 
where (countif_ > 0)
Check WinRM Security Event ID Details using SCCM CMPivot 6
Check WinRM Security Event ID Details using SCCM CMPivot 6

Check Security Event ID Details

Let’s try to use Windows Security events to track the devices with some errors or with specific event IDs etc. But you need to be careful with the CMPivot query here, as explained below.

Security Event Logs path is Windows Logs -> Security, and However, when you convert that into CMPivot, you need to be a bit more careful. You need to use “Security” as the path mentioned in the CMPivot query below to fetch the Windows security events.

NOTE! – The following CMPivot query gets Windows security event log details from all the devices in a particular collection for the last 2 hours. This information can be overwhelming. So try to reduce the number of devices in the collection before running this query.

WinEvent('Security', 2h)
Check WinRM Security Event ID Details using SCCM CMPivot 7
Check WinRM Security Event ID Details using SCCM CMPivot 7

You can get the IP address auditing for incoming Windows Remote Management (WinRM) connections in security event 4262 and WinRM event 91 using the following CMPivot query.

The following CMPivot query helps to get new security events from the devices for the last 2 hours based on the specific event IDs.

WinEvent('Security', 2h) | where ID == 4262 or ID == 91
Check WinRM Event ID Details using SCCM CMPivot 8
Sample Pic – Check WinRM Event ID Details using SCCM CMPivot 8

Some other sample CMPivot queries to check IP address auditing for WinRM connections.

WinEvent('Security') | 
summarize countif( (Message contains 'IP Address') ) by Device | 
where (countif_ > 0)

Resources

CMPivot overview – Configuration Manager | Microsoft Docs

Author

Anoop C Nair is Microsoft MVP! He is a Device Management Admin with more than 20 years of experience (calculation done in 2021) in IT. He is Blogger, Speaker, and Local User Group HTMD Community leader. His main focus is on Device Management technologies like SCCM 2012, Current Branch, and Intune. He writes about ConfigMgr, Windows 11, Windows 10, Azure AD, Microsoft Intune, Windows 365, AVD, 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 · 1 comment

  1. Hello,
    Is it possible to combive some WinEvent with some EventLog I am asking because in old Operating Systems the events were in EventLog Only…
    WinEvent(‘Microsoft-Windows-Windows Defender/operational’, 7d) | where (ID == 1000 or ID == 1001)
    OR
    EventLog(‘System’) | where (ID == 1000 or ID == 1001)

    Thanks,
    Dom

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