Windows commands can identify whether a mouse, network adapter, wake timer or scheduled task is waking a sleeping PC, helping you disable only the responsible trigger.
Start by running `powercfg -lastwake` in an administrator Terminal to identify the most recent wakeup. Then use `powercfg -waketimers` to view scheduled wake timers and `powercfg -devicequery wake_armed` to list devices permitted to wake the PC. These commands show different information: a device may be authorized to wake the computer without causing the latest event.
If a mouse or keyboard is responsible, open Device Manager, find the device, select Properties > Power Management, and clear “Allow this device to wake the computer.” You can leave one input device enabled so resuming remains convenient.
For network wakeups, change the same permission for the relevant Ethernet or Wi-Fi adapter. If Wake-on-LAN is needed, enable “Only allow a magic packet to wake the computer” to limit wakeups to intentional signals.
Windows Automatic Maintenance and third-party applications such as cloud backup services can also schedule wakeups. Check Automatic Maintenance, Task Scheduler and the app’s own scheduling settings. Under Edit power plan > Change advanced power settings > Sleep > Allow wake timers, choose Disable or Important Wake Timers Only according to your needs.
Change one setting at a time and run `powercfg -lastwake` again after another unexpected wakeup. This helps isolate the cause without unnecessarily disabling keyboard access, network features or scheduled tasks.