Hi all,
I’m looking to continuously grab the most recent logs from a client’s machine that is remote, and dump the output to a file. I’m testing an error where the machine will crash in the midst of playing a video. The box stays powered on but goes non responsive, thus the goal of continuous log grabbing so I can have the most recent events up till the crash happens. I was thinking of using the below, but from what I understand this will only get the newest 100 logs from the time I run the command. Thoughts? Any help is appreciated!
Get-EventLog -ComputerName %ComputerName% -Newest 100 | Tee-Object -FilePath C:tempEventsTest1.txt
submitted by /u/NtGuru
[link] [comments]
The post Use Get-EventLog to Continuously Grab Most Recent Logs from Remote Computer appeared first on How to Code .NET.