I have to write a security event log to a text file for which I've used the following wevtutil command and its working flawlessly.
wevtutil qe Security /rd:true /f:text /q:"*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 12800 and (band(Keywords,4503599627370496)) and (EventID=4656)]]" > C:\Users\main\Desktop\gg.txt
I want it to be created on the fly as the event is generated so putting the batch file in the task scheduler is the only way out. The problem is it'll be too difficult for me to learn batch file programming just for this one purpose!! Sorry I am being frank.
Can you guys please help me out in creating a batch file which writes the output to a text file?