tacticalrmm/scripts_wip/Win_Info_Last_Reboot_Info.ps1

7 lines
207 B
PowerShell

#Find last reboot information
gwmi win32_ntlogevent -filter "LogFile='System' and EventCode='1074' and Message like '%restart%'" |
select User,@{n="Time";e={$_.ConvertToDateTime($_.TimeGenerated)}}