locked
How can I reliably determine the boot time? RRS feed

  • Question

  • Hi,

    I am trying to find a reliable method how to determine the boot time of our Windows clients (still mostly Windows 7). As far as I can see, it is mostly recommended to use WMI ($x = gwmi -comp $Computer -cl Win32_OperatingSystem) but in several cases (about 7 % in our domain) the time ($x.LastBootupTime) does not correspond to the latest Event 6009 in the system log and is obviously wrong.

    What is the reason for the discrepancies? Querying the event log is much slower...

    Thanks, Georg.

    Thursday, April 27, 2017 8:52 AM

All replies

  • Hi Georg,

    I always check event log to see the boot time of system. Navigate the folders to Applications and Services Logs/Microsoft/Windows/Diagnostics-Performance, filter Event ID: 100

    There is a guide introducing how to operate.

    https://www.howtogeek.com/72420/how-to-use-event-viewer-to-find-your-pcs-boot-time/

    Please Note: Since the website is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Regards


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, April 27, 2017 9:42 AM
  • Try this from a command line or in a batch file.

    systeminfo | find "System Boot Time">lastboot.txt

    Thursday, April 27, 2017 3:21 PM
  • As far as I can see, systeminfo returns the same value as WMI...
    Thursday, April 27, 2017 3:24 PM
  • Have you try to check Event  in event log?

    It’s more exact.

    There is a screenshot of mine, sorry for that I only have Windows 7 Chinese language version.


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.


    Friday, April 28, 2017 1:13 AM
  • In the meantime, I found this very detailed description:

    http://www.happysysadm.com/2014/07/windows-boot-time-explored-in-powershell.html

    Depending on the method, one would get slightly different times. But I am still having the problem that for a number of machines the boot time derived from WMI is hours or even days from the boot time I get from the event log.

    Friday, April 28, 2017 1:18 PM