How to enable / prevent device from waking Windows 10 computer
This guide will show you how to allow or prevent devices from waking Windows 10 PCs from Sleep or Hibernate.
Note : You must be logged in as an administrator to do this.
Option 1: Allow or prevent the device from waking the computer in Command Prompt
1. Open Command Prompt with admin rights.
2. Perform step 3 (to allow) or step 4 (to prevent the device from waking the computer) below, depending on what you want to do.
3. To allow the device to wake the computer:
A) Enter the command below into the Command Prompt and press Enter
.

This step will give you a list of all devices that support waking the computer from any sleep state.
Write down the device name (for example, "HID Keyboard Device" ) you want to allow to wake up the computer.
powercfg -devicequery wake_from_any
B) Enter the command below into the Command Prompt and press Enter
. You can close the Command Prompt when finished.
powercfg -deviceenablewake "Device Name"

Replace Device Name in the above command with the device's actual name.
For example:
powercfg -deviceenablewake "HID Keyboard Device"
4. To prevent the device from waking the computer:
A) Enter the command below into the Command Prompt and press Enter
.
This step will give you a list of all devices that can wake up the computer.
Write down the device name (for example, "HID Keyboard Device" ) you want to prevent from waking the computer.
powercfg -devicequery wake_armed

B) Enter the command below into the Command Prompt and press Enter
. You can close the Command Prompt when finished.
powercfg -devicedisablewake "Device Name"

Replace Device Name in the above command with the device's actual name.
For example:
powercfg -devicedisablewake "HID Keyboard Device"
Option 2: Allow or prevent the device from waking the computer in Device Manager
1. Open Device Manager ( devmgmt.msc ).
2. Expand the device category (for example, Keyboards and double-click the device (eg "HID Keyboard Device" ) that you want to allow or prevent the computer from waking.

3. Select or deselect Allow this device to wake the computer according to what you want and click OK.

4. When done, you can close Device Manager if desired.
You should read it
- How to prevent theft of personal data on Windows Phone 8
- 5 best virtual machines for Windows 11 PCs
- How to Prevent a Computer from Waking Up from External Devices
- Steps to install windows 11 on virtual machine, how to install windows 11 on VMware
- How to fix 'No Boot Device Found Press Any Key to Reboot the Machine' error on Windows
- How to set up a Windows virtual machine in Linux
- How to prevent and handle when Windows Update deletes Linux
- Fix the error of not running VMware virtual machine, VirtualBox on Windows 10
- How to Tune a Java Virtual Machine (JVM)
- How to create a Windows 10 virtual machine with VMware Player and VirtualBox
- How to fix 'This Device is Disabled (Code 22)' error on Windows 11
- How Undo works on Windows PC
May be interested
How to delete thumbs.db file on Windows 10
Turn on / off color display for Start, Taskbar and Action Center on Windows 10
How to use the Windows 10 DPI Fix utility to fix blurry text errors
How to unlink a Windows 10 license from a Microsoft account
Download the Indexer Diagnostic Tool for Windows 10
Turn on / off auto-arrange in folders in Windows 10