New
#1
How can i export my Backup Event-Id's for 10 servers to 1 .txt file
Hi all!
First of all, i am new to scripting but i want to learn it.
We have Server 2012R2 in our organization and Windows Server Backup is running on each server daily. I want to automatically write a .txt file every day with the backup result to a destination (C:\Logfiles). I want all servers to write in that same file so i have 1 text-file with 10 server backup results from each one.
I know i can attach a script to an Event-ID, such as eventid:4 (backup success).
I am working on this for 2 days now but what am i doing wrong?
I used powershell and also cmd but can't get it working (wevtutil qe Microsoft-Windows-Backup /f:text /q:"*[System/EventID=4] and *[EventData/Data[@Name='HRESULT']='0']")
The script is needed for failed backup results and successfull backup results. I know that the failed backup results have a lot of event id's: 5,8,9,17,22 etc.
Can somebody help me with this?