PS-Commands/Scripts/Log-Reboot.ps1

21 lines
378 B
PowerShell
Raw Permalink Normal View History

2023-08-17 13:45:36 +03:00
$query = '
<QueryList>
<Query Id="0" Path="System">
<Select Path="System">
*[
System[
EventID=41 or
EventID=1074 or
EventID=1076 or
EventID=6005 or
EventID=6006 or
EventID=6008 or
EventID=6009 or
EventID=6013
]
]
</Select>
</Query>
</QueryList>
'
Get-WinEvent -LogName System -FilterXPath $query