How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query for Event Logs Error

Let’s find out ConfigMgr CMPivot Query to Collect Windows Update Logs from SCCM Client Remotely. The ConfigMgr CMPivot is based on fast channel notification architecture. The WindowsUpdate.log is part of event logs called WindowsUpdateClient with the latest versions of Windows.

Many organizations are using SCCM (WSUS) and Intune (WUfB) to patch Windows 10 devices. Collecting Windows update logs (WindowsUpdate.log) from the SCCM client is important to troubleshoot issues related to Windows updates or patching.

ConfigMgr CMPivot query tool allows you to assess the state of devices quickly. When you run a query against a device collection, the CMPivot tool will run a query in real-time on all currently connected (online) devices in the selected collection.

Patch My PC

WindowsUpdateClient Event Logs

You don’t have WindowsUpdate.log available as out of the box with the latest version of Windows. Instead, you need to use the following PowerShell command to create WindowsUpdate.log. The Get-WindowsUpdateLog cmdlet merges and converts Windows Update .etl files into a single readable WindowsUpdate.log file.

Get-WindowsUpdateLog
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs

How to Collect Windows Update Logs from SCCM Client

You can use the CMPivot query to collect Windows update logs from Windows devices. This is the best and easy way to get the error details from Windows Update Client event logs.

  • Navigate to device collection against that you want to run the CMPivot query.
  • Select any device collection.
  • Right-Click on Device collection.
  • Select Start CMPivot.

NOTE! – In a production environment with more than many Windows devices, I don’t recommend using All System collection. Instead, use the collection with a smaller number of devices to try out the query.

1E Nomad
Launch SCCM CMPivot Query Tool  How to Collect Windows Update Logs from SCCM Client
How to Collect Windows Update Logs from SCCM Client

ConfigMgr CMPivot Query for Event Logs

Let’s see how to find the ConfigMgr CMPivot query for event logs. It would be best if you were mindful of the logs information that you query through CMPivot.

The following CMPivot query gives you the details of Microsoft-Windows-WindowsUpdateClient/Operational event logs for the last one hour.

WinEvent('Microsoft-Windows-WindowsUpdateClient/Operational', 1h)
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs

The following CMPivot query gives you the details of Microsoft-Windows-WindowsUpdateClient/Operational event logs for the last day.

WinEvent('Microsoft-Windows-WindowsUpdateClient/Operational', 1d)
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query Event Logs

The following CMPivot query gives you the error and count of devices with a summary dashboard by querying Microsoft-Windows-WindowsUpdateClient/ Operational event logs for the last day.

WinEvent('Microsoft-Windows-WindowsUpdateClient/Operational', 1d)
| where LevelDisplayName =='Error'
| summarize count() by Device
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query for Event Logs
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query for Event Logs

Export CMPivot Query Results

Let’s find out how to export CMPivot query results in to a CSV file.

  • Click on Export button.
  • From the drop down menu, select Result to file.
DeviceLevelDisplayNameDateTimeMessageProviderNameID
Prod-Win20Information07-02-2021 03:41Windows Update successfully found 0 updates.Microsoft-Windows-WindowsUpdateClient26
Sample Results
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query for Event Logs
How to Collect Windows Update Logs from SCCM Client Remotely ConfigMgr CMPivot Query for Event Logs

Resources

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.