Need a Powershell script to turn off power saving feature for all NICs

CoP 5 Reputation points
2025-11-25T19:54:58.15+00:00

Hi Everyone,

Since Microsoft took away the ability to disable the "Allow the computer to turn off this device to save power" via GPO, we're looking at creating a PS script that can be run once on a PC or laptop that has a physical NIC and disable this option. As an example, this is from a PC with a Realtek PCIe GBE Controller:

User's image

Has anyone come across, or created a PowerShell script that will essentially do this for ANY physical NIC?

TYIA!

Windows for business | Windows Client for IT Pros | User experience | Session connectivity
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. VPHAN 10,640 Reputation points Independent Advisor
    2025-11-25T20:28:27.4966667+00:00

    Good morning CoP,

    FYI, Microsoft removed GPO control over this setting, but WMI access to the MSPower_DeviceEnable class under root\wmi remains viable. You can enumerate physical adapters via Win32_NetworkAdapter, filter out virtual and wireless interfaces, and then match their PNPDeviceID against the InstanceName in MSPower_DeviceEnable. Once matched, set Enable = $False and commit with .Put().

    Use this pattern:

    Screenshot 2025-11-26 at 03.27.02 This disables the “Allow the computer to turn off this device to save power” for all physical NICs. It doesn't affect wake settings. For broader device coverage or CIM-based alternatives, adapt the query to Get-CimInstance and ensure elevated execution context. This script must be run with administrative privileges.

    I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer then. Should you have more questions, feel free to leave a message. Have a nice day!

    Vivian


  2. VPHAN 10,640 Reputation points Independent Advisor
    2025-11-26T16:41:37.9633333+00:00

    Good morning,

    I hope you've found something useful here. If it helps you get more insight into the issue, it's appreciated to accept the answer then. Should you have more questions, feel free to leave a message. Have a nice day!

    VP

    0 comments No comments

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.