How to filter Object that that contains only KB number in Event Viewer/Setup

Welcome Forums General PowerShell Q&A How to filter Object that that contains only KB number in Event Viewer/Setup

Viewing 1 reply thread
  • Author
    Posts
    • #280734
      Participant
      Topics: 11
      Replies: 11
      Points: 130
      Rank: Participant

      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

    • #280809
      Participant
      Topics: 4
      Replies: 422
      Points: 734
      Helping Hand
      Rank: Major Contributor

      Are you saying you just want a list of the KB numbers that appear in the Message field?

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.