All PowerShell Versions
Sometimes, you may have to evaluate system log files that have been exported to disk, or you want to read a system log file in “evtx” format directly from a file.
Here is how you do this:
$path = "$env:windir\System32\Winevt\Logs\Setup.evtx" Get-WinEvent -Path $path