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, 11 months ago.

  • Author
  • #8658
    Profile photo of rbala006

    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

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

    Get-WinEvent Microsoft-Windows-Backup | where {$ -eq 4 -or $ -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.