Share via

How to disable "Allow the computer to turn off this device to save power" on Windows 11 wo GUI?

Ma, Yu Qing1 5 Reputation points
2026-02-05T09:40:40.25+00:00

In our project, we need to disable "Allow the computer to turn off this device to save power" on the Ethernet for a stable connection. And I need to finish this setting in a script or in an iso rather than by Windows GUI.

I tried the method described there to modify the regedit.
https://learn.microsoft.com/en-us/troubleshoot/windows-client/networking/power-management-on-network-adapter
But after I restart my Windows, it doesn't work properly. The "Allow the computer to turn off this device to save power" is still checked.

So how can I disable it (Not by GUI)? Thank you.

Windows for home | Windows 11 | Devices and drivers
0 comments No comments

Answer recommended by moderator

Ma, Yu Qing1 5 Reputation points
2026-02-06T06:50:17.9566667+00:00

My final solution is executing these commands in powershell by admin. It works.

$adaptersEthernet = Get-NetAdapter -Physical | Where-Object { $_.InterfaceType -eq 6 } | Get-NetAdapterPowerManagement 
foreach ($adapterEthernet in $adaptersEthernet)
{
    $adapterEthernet.AllowComputerToTurnOffDevice = 'Disabled'
    $adapterEthernet | Set-NetAdapterPowerManagement
}

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Thomas4-N 16,945 Reputation points Microsoft External Staff Moderator
    2026-02-28T12:01:09.11+00:00

    Hello Ma, Yu Qing1, welcome to Microsoft Q&A forum.

    Thanks for coming back and sharing what works.

    Disabling power management on Ethernet adapters prevents Windows from turning off the adapter to save power, which can cause network disconnections—critical for projects requiring stable connections or automated scripts. Your PowerShell script works because it targets all physical Ethernet adapters by interface type (6 = Ethernet) rather than by adapter name, which can vary between systems. The loop ensures every Ethernet adapter gets power management disabled, preventing the "allow computer to turn off device" setting from re-enabling.

    This is a solid approach and will be helpful for others facing the same issue. I really appreciate you posting the solution.

    Was this answer helpful?

    0 comments No comments

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  3. AI answer

    2026-02-05T09:40:49.3566667+00:00

    To disable the "Allow the computer to turn off this device to save power" setting for a network adapter in Windows 11 without using the GUI, you can use PowerShell commands. Here’s how you can do it:

    1. Open PowerShell as an administrator.
    2. Use the following command to disable power management for the specified network adapter (replace "Ethernet 1" with the name of your network adapter):
         Disable-NetAdapterPowerManagement -Name "Ethernet 1"
      

    This command will disable the power management feature for the specified network adapter, ensuring that the setting is not checked after a restart.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

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.