Filtering a get-winevent in powershell ise RRS feed

  • Question

  • cd ~

    $FormatEnumerationLimit = -1

    $Yesterday = (Get-Date).AddDays(-1)

    Get-WinEvent -MaxEvent 500 -LogName "Microsoft-Windows-PrintService/Operational" -ComputerName "computer01" | Where-Object {$_.TimeCreated -ge $Yesterday} |format-table Id, TimeCreated, Message -Wrap | ft -Autosize

     I'm trying to get this to also filter out two more objects from the winevent string I've beven unable to add a filtering command that separates it by what I need without outputting it to a file which makes it come out looking messy. I need it to filter out event Id and by a specific word in one of the strings

    • Edited by Muphinmahn Saturday, February 3, 2018 5:37 PM
    • Moved by Bill_Stewart Monday, March 12, 2018 9:18 PM Unanswerable drive-by question
    Saturday, February 3, 2018 5:34 PM

All replies