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:
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