systeminfo shows when the system came up after a restart, but does not show when it comes up after a shutdown and then a power on.
For instance when I run this command:
systeminfo | find "Sys"
the output shows:
System Boot Time: 8/10/2018, 8:45:22 AM
Which was when I did a restart.
I tried a solution in the previous question:
Get-WinEvent -LogName Microsoft-Windows-Diagnostics-Performance/Operational | Where { $_.Id -eq 200 }
and got these results on my laptop:
PS C:\Program Files\PowerShell\6.0.0> Get-WinEvent -LogName Microsoft-Windows-Diagnostics-Performance/Operational | Wher
e { $_.Id -eq 200 }
ProviderName: Microsoft-Windows-Diagnostics-Performance
TimeCreated Id LevelDisplayName Message
----------- -- ---------------- -------
7/30/2018 1:54:18 PM 200 Critical Windows has shutdown: ...
6/29/2018 9:08:40 AM 200 Critical Windows has shutdown: ...
PS C:\Program Files\PowerShell\6.0.0>
I'm looking for the time I turn on the computer and the time I shut it down each day. I'd like a command line so I can collect the information into a batch file.