Disable XHCI power saving by commandline

YongY Li 0 Reputation points
2025-11-20T01:26:20.34+00:00

Hi sir,

we can disable power saving in device manager for USB root hub as below. Could you help comment if we have command/bat to set it disable? Thanks.

User's image


Moved from: Windows Insider program | Windows Insider preview | Devices and drivers

Windows for business | Windows Client for IT Pros | Devices and deployment | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. YongY Li 0 Reputation points
    2025-11-20T01:44:04.02+00:00

    Hi sir,

    Do you have comment the function impact after disable power saving for USB root hub?

    0 comments No comments

  2. Thomas4-N 4,245 Reputation points Microsoft External Staff Moderator
    2025-11-20T10:58:07.95+00:00

    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. 


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.