Disable power saving on drivers

1

I need to disable the following option in Windows10:

  

Allow the computer to turn off this device to save power

The above option can be found by right-clicking on the This PC - > Manage - > Device Manager then choose a driver in my case I will use USB which is what I need and we will Properties it in Power Management , see image below:

AfterexplainingwhatIwantlet'stheinterestingpartIneededsomewaytodisablethischeckboxthrough"code" or by command line, or registration, PowerShell ...

I have already tried to register go there is your location, eg:

HKLM\System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USB]

“DisableSelectiveSuspend”=dword:00000001  
02

But you do not have any option that changes the state, I've tried creating the DWORD PnPCapabilities = 24 field and it did not work. I've tried the following too but it does not do what I want:

HKLM\System\CurrentControlSet\Control\Class\{36FC9E60-C465-11CF-8056-444553540000}
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USB]

“DisableSelectiveSuspend”=dword:00000001  
02

And among some other tested things, someone knows some way to do it or one of the things I mentioned is correct and I might be doing something wrong.

    
asked by anonymous 24.10.2017 / 14:12

1 answer

-1

According to this Technet post , this is possible through PowerShell:

If($PnPCapabilitiesValue -eq 0) 
{ 
    #check whether change value was successed. 
    Try 
    {     
        #setting the value of properties of PnPCapabilites to 24, it will disable save power option. 
        Set-ItemProperty -Path $KeyPath -Name "PnPCapabilities" -Value 24 | Out-Null 
        Write-Host """$PhysicalAdapterName"" - The option ""Allow the computer to turn off this device to save power"" was disabled." 

        Write-Warning "It will take effect after reboot, do you want to reboot right now?" 
        [string]$Reboot = Read-Host -Prompt "[Y] Yes  [N] No   (default is 'N')" 
        If ($Reboot -eq "y" -or $Reboot -eq "yes")  
        { 
            Restart-Computer -Force 
        } 
    } 
    Catch 
    { 
        Write-Host "Setting the value of properties of PnpCapabilities failed." -ForegroundColor Red 
    } 
}

24.10.2017 / 14:21