Welcome › Forums › General PowerShell Q&A › How to filter Object that that contains only KB number in Event Viewer/Setup
Hi I want to extract out only KB number that is stored in Event Viewer/Setup. Below code is my start. Thank you
Get-WinEvent -FilterHashtable @{logname='Setup'} | Select-Object MachineName, RecordID, TimeCreated, ID, LevelDisplayName, Message | Where-Object { $_.Message -like "*KB*" } | Format-Table -AutoSize
Are you saying you just want a list of the KB numbers that appear in the Message field?