Skip to content

Find out what keeps waking your PC from sleep — via Microsoft Learn

Commandlow riskNeeds adminWindows 11Windows 10

If your PC wakes up at night, powercfg can tell you what woke it last, which timers are set to wake it, and which devices (mouse, network card) are allowed to — then switch off wake for a device.

Takes effect right away

Command

Run in an administrator Command Prompt / Terminal window.

powercfg /lastwake
powercfg /waketimers
powercfg /devicequery wake_armed
powercfg /devicedisablewake "HID-compliant mouse"

Undo

powercfg /deviceenablewake "HID-compliant mouse"
Replace "HID-compliant mouse" with an exact name from the wake_armed list. You can also untick Allow this device to wake the computer on the device's Power Management tab in Device Manager. powercfg /a lists which sleep states your hardware supports.

Sources

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.

wake from sleeppowercfglastwakewaketimerssleep

More in Sign-in, Boot & Shutdown