Might check the system event log Source:EventLog, Event ID:6006, 6005 stopped / started events.
--please don't forget to close up the thread here by marking answer if the reply is helpful--
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
How to get the device last reboot details like date & time via PowerShell or any other way for this?
Might check the system event log Source:EventLog, Event ID:6006, 6005 stopped / started events.
--please don't forget to close up the thread here by marking answer if the reply is helpful--
You can use Get-ComputerInfo cmdlet to get the data you are looking for. However, there may be faster options.
(Get-ComputerInfo).OsLastBootUpTime
If you want to compare it to the current time to do some logic on how long it has been up.
$BootUpTime = (Get-ComputerInfo).OsLastBootUpTime
$LocalTime = (Get-ComputerInfo).OsLocalDateTime
$UpTime = $LocalTime - $BootUpTime