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

Vinod Survase 4,736 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 Intune Security
Microsoft Intune Security
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Security: The precautions taken to guard against crime, attack, sabotage, espionage, or another threat.
412 questions
Microsoft Intune Configuration
Microsoft Intune Configuration
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Configuration: The process of arranging or setting up computer systems, hardware, or software.
1,885 questions
Microsoft Intune Enrollment
Microsoft Intune Enrollment
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Enrollment: The process of requesting, receiving, and installing a certificate.
1,351 questions
Microsoft Intune
Microsoft Intune
A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.
4,991 questions
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 576 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.