tacticalrmm/scripts_wip/Win_Info_Last_Reboot_Info.ps1

7 lines
207 B
PowerShell
Raw Normal View History

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