È possibile utilizzare PowerShell per questo.
Spegnimento
Get-WinEvent -LogName Microsoft-Windows-Diagnostics-Performance/Operational | Where { $_.Id -eq 200 }
``` ```
Get-WinEvent -FilterHashtable @{LogName = "Microsoft-Windows-Diagnostics-Performance/Operational"; Id = 200; }
Questo vi darà un elenco dei tempi di spegnimento registrati.
Comando alternativo, meglio ottimizzato per le connessioni remote:
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
2017-01-28 18:25:46 200 Critical Windows has shutdown
2016-11-01 19:55:21 200 Error Windows has shutdown
2016-10-29 00:18:38 200 Critical Windows has shutdown
2016-10-26 23:16:55 200 Warning Windows has shutdown
2016-10-26 15:37:40 200 Warning Windows has shutdown
2016-10-26 02:18:24 200 Warning Windows has shutdown
2016-10-26 02:10:34 200 Warning Windows has shutdown
2016-10-26 02:04:01 200 Warning Windows has shutdown
2016-10-25 14:23:11 200 Warning Windows has shutdown
2016-10-25 13:07:46 200 Error Windows has shutdown
2016-10-25 00:18:12 200 Error Windows has shutdown
2016-10-19 13:16:39 200 Critical Windows has shutdown
``` ```
Get-WinEvent -LogName Microsoft-Windows-Diagnostics-Performance/Operational | Where { $_.Id -eq 100}
Uscita di esempio:
Get-WinEvent -FilterHashtable @{LogName = "Microsoft-Windows-Diagnostics-Performance/Operational"; Id = 100; }
Startup
Il seguente comando vi darà un elenco dei tempi di avvio registrati.
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
2017-10-07 21:35:38 100 Critical Windows has started up
2017-01-28 18:25:48 100 Critical Windows has started up
2016-12-11 17:45:07 100 Critical Windows has started up
2016-11-16 13:26:52 100 Critical Windows has started up
2016-11-01 19:55:21 100 Critical Windows has started up
2016-10-29 00:18:39 100 Critical Windows has started up
2016-10-26 23:16:55 100 Error Windows has started up
2016-10-26 14:51:07 100 Error Windows has started up
2016-10-26 02:24:01 100 Error Windows has started up
2016-10-26 02:18:24 100 Critical Windows has started up
2016-10-26 02:10:34 100 Error Windows has started up
2016-10-26 02:04:01 100 Critical Windows has started up
2016-10-25 14:23:12 100 Error Windows has started up
2016-10-25 13:07:47 100 Error Windows has started up
2016-10-25 12:56:23 100 Error Windows has started up
2016-10-19 13:16:39 100 Critical Windows has started up
``` &001
Comando alternativo, meglio ottimizzato per le connessioni remote:
&001 &001
Uscita di esempio:
&001 &001
Ho testato questo comando su PowerShell 5.1 e Windows 10.0.15063. Ma dovrebbe funzionare anche su Windows 7, purché si abbia almeno PowerShell 3.0. Si noti che è necessario eseguirlo come admin.
Troverete la documentazione completa del comando qui [ docs.microsoft.com ](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-winevent?view=powershell-5.1)