How can I tell if Windows was cold booted or restarted?

0
11
Asked By CuriousCat99 On

I'm trying to set up a task that should only run when Windows starts from a completely powered-off state, but if it's just a restart, I want to skip it. I've looked into possible methods, but most suggestions involve checking timestamps in the Event Log, which hasn't yielded clear results. I'm wondering if there are any recent updates in Windows or PowerShell that could help differentiate between a cold boot and a warm reboot.

1 Answer

Answered By TechieTim123 On

You can easily use the Event Log to differentiate between cold and warm boots. The log generates different event IDs based on the boot type, so you could write a simple script to scan through it and respond accordingly.

BootMaster456 -

I checked the Event Log, and I only saw event ID 6009 for both types. Are there other IDs I'm missing?

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.