Find out what woke your PC up at night — via Microsoft Learn
If your PC keeps waking from sleep by itself, powercfg can tell you why. /lastwake shows what triggered the most recent wake, and /waketimers lists scheduled tasks that are allowed to wake the PC.
Takes effect right away
The easy way
- Run both commands in an elevated Command Prompt.
- If a device (often a mouse or network adapter) is to blame, open Device Manager → that device → Properties → Power Management and untick Allow this device to wake the computer.
Command
Run in an administrator Command Prompt / Terminal window.
powercfg /lastwake
powercfg /waketimersThese commands only read information.
Sources
- Powercfg command-line options — by Microsoft Learn
- Source reviewed
- 2026-11-02
- Link checked
- 2026-11-02
- Tested hands-on
- Not by Oddbyte.Me
Oddbyte.Me hasn't tried this on every Windows build, so keep the undo handy.