Hello YongY Li, welcome to Microsoft Q&A forum.
I have come across two threads that provide working solutions for this exact issue. Both scripts should be run in an elevated (Administrator) PowerShell window.
(The scripts are changed to the modern syntax)
Option 1: Apply to all USB devices
From Reddit discussion :
(Disclaimer: This is a non-Microsoft website. The page appears to be providing accurate and safe information. Watch out for ads on the site that may advertise products frequently classified as PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.)
Get-CimInstance -Namespace root\wmi -ClassName MSPower_DeviceEnable |
Where-Object InstanceName -like '*USB*' |
Set-CimInstance -Property @{Enable = $false}
This command disables the “Allow the computer to turn off this device to save power” setting for all USB-related devices.
Option 2: Target only USB Root Hubs
From Microsoft Q&A thread:
Get-CimInstance Win32_USBHub | ForEach-Object {
Get-CimInstance MSPower_DeviceEnable -Namespace root\wmi |
Where-Object InstanceName -like "*$($_.PNPDeviceID)*" |
Set-CimInstance -Property @{Enable = $false} }
This version is more selective and only applies to USB Root Hubs. You can reverse the change by replace $false with $true.
Functional impact after disabling power saving
- It prevents unwanted USB disconnections and improves wake reliability for devices like keyboards, mice, and docks.
- There is a minor increase in idle power consumption (usually less than 1 watt on desktops, slightly more noticeable on laptops).
- No stability or compatibility issues have been reported across many deployments.
If the initial response doesn’t resolve your issue or if you have any questions about the steps, you can click “Add Comment” to provide more details, or use “Post Answer” if commenting isn’t available. Don’t worry—I’m here to assist you further if needed.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.