Windows Eventviewer Log to Text File

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Matt Tilford Matt Tilford 3 years, 9 months ago.

  • Author
    Posts
  • #8658
    Profile photo of rbala006
    rbala006
    Participant

    In Eventviewer -> Application and Services -> Microsoft -> Windows -> Backup -> Operational there are various events, In case Event ID 4 or 5 occurs need to send all the contents in details tab to a text file using powershell.

  • #8674
    Profile photo of Matt Tilford
    Matt Tilford
    Participant

    The basics of the information you are after i think will be covered by

    Get-WinEvent Microsoft-Windows-Backup | where {$_.id -eq 4 -or $_.id -eq 5} | select -Property * | Out-File events.txt

    That's the very basics of the command. There are plenty of other parameters that can be set depending on what your deeper requirements are.

You must be logged in to reply to this topic.