How to get the device last reboot details like date & time via PowerShell or any other way for this?

Vinod Survase 4,776 Reputation points
2023-10-27T14:44:29.7233333+00:00

How to get the device last reboot details like date & time via PowerShell or any other way for this?

Microsoft Security | Intune | Security
Microsoft Security | Intune | Configuration
Microsoft Security | Intune | Enrollment
Microsoft Security | Intune | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Anonymous
    2023-10-27T14:52:00.4433333+00:00

    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--


  2. Nick Eckermann 606 Reputation points
    2023-10-27T19:55:41.56+00:00

    You can use Get-ComputerInfo cmdlet to get the data you are looking for. However, there may be faster options.

    (Get-ComputerInfo).OsLastBootUpTimeUser's image

    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

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.