locked
Once Again: How do you insure that "Allow the computer to turn off this device to save power" is uncheck on your network adapter? RRS feed

  • Question

  • This really frustrating, all of the suggestions I've found, except for manually changing the settings through the registry fail. Even the "official" powershell script posted by Microsoft doesn't work: DisableNetworkAdapterPnPCapabilities.ps1

    This attitude of "tossing stuff over the fence" seems to be at the heart of the problem. If your producing support documents you reallyreally, need to test them FIRST. Simply posting half baked scripts and then leaving it "as is" for everyone to figure out/ fix is unacceptable.  This is one task out of many for me. Figuring stuff out when it is supposedly already document is not effective use of my time. Broken out of the box seems to be the state of most of the "fixes" floating around. You Microsofties are ruining my day, again!

    Wednesday, October 1, 2014 6:51 PM

Answers

  • I recommend calling Microsoft customer support and opening an incident if this is that important.  This is not a Microsoft support forum and it is not customer service.  Apparently for most of us this works.  I suspect you are misunderstanding something in what is happening.

    You also have not posted a script. This is a scipring forum.  It is very hard to be of much help without a script.


    ¯\_(ツ)_/¯

    • Marked as answer by Bill_Stewart Thursday, November 20, 2014 3:57 PM
    Wednesday, October 1, 2014 7:20 PM

All replies

  • We don't work for Microsoft.

    What's your specific scripting question?

    I do this via registry settings, which require a reboot to take effect.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Wednesday, October 1, 2014 6:53 PM
  • Sorry the url had microsoft and technet...I assumed that this site was at least somehow related to Microsoft. 

    The question is in the title: How do you insure that "Allow the computer to turn off this device to save power" is unchecked on your network adapter? The reason I'm asking, again, is that none of the material on technet properly addresses the issue.

    I need away to insure that this remains unchecked through syspreping a machine. The referenced powershell script fails without error. The instructions are too simple to screw up: simply run from a elevated command shell prompt. I did and didn't work. The comments from others indicate that script has errors...as far as I can tell, this was Microsoft's best effort to solve the issue.

    The Microsoft documentation is vague and contradictory. Some articles say PNPCapiblilties should be set one way, others another. 

    I just need something that I can drop into to my deployment process and be done with this. I'm currently poking around under the hood to trying and figure out how this actually works so that I can create a solution that does work. 

    Wednesday, October 1, 2014 7:14 PM
  • I recommend calling Microsoft customer support and opening an incident if this is that important.  This is not a Microsoft support forum and it is not customer service.  Apparently for most of us this works.  I suspect you are misunderstanding something in what is happening.

    You also have not posted a script. This is a scipring forum.  It is very hard to be of much help without a script.


    ¯\_(ツ)_/¯

    • Marked as answer by Bill_Stewart Thursday, November 20, 2014 3:57 PM
    Wednesday, October 1, 2014 7:20 PM
  • Note also that the script you referenced has an example of how ti is to be run.  Have you tried this.

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

    Note that it requires two things.  You muxt run eleveated and the script must reboot the system.  Have you done all of that?


    ¯\_(ツ)_/¯

    Wednesday, October 1, 2014 7:22 PM
  • Here is a test you can run.  If it fails to return any objects then you have no candidate adapters that can be set as you require.

     Get-WmiObject -Class Win32_NetworkAdapter|
            Where-Object{$_.PNPDeviceID -notlike "ROOT\*" -and $_.Manufacturer -ne "Microsoft" -and $_.ConfigManagerErrorCode -eq 0 -and $_.ConfigManagerErrorCode -ne 22} 

    On most systems it will retrun at least the physical Ethernet adapter. On mine I get both Ethernet wired and Wi-Fi

    ServiceName      : L1C
    MACAddress       : 7C:05:07:26:50:D5
    AdapterType      : Ethernet 802.3
    DeviceID         : 7
    Name             : Atheros AR8161/8165 PCI-E Gigabit Ethernet Controller (NDIS 6.20)
    NetworkAddresses :
    Speed            : 9223372036854775807
    
    ServiceName      : netr28x
    MACAddress       : 2C:D0:5A:E9:E9:C4
    AdapterType      : Ethernet 802.3
    DeviceID         : 13
    Name             : 802.11n Wireless LAN Card
    NetworkAddresses :
    Speed            : 327000000
    


    ¯\_(ツ)_/¯

    Wednesday, October 1, 2014 7:35 PM
  • Looks like this script will only do something if the current value is 0 or null. You can change that -eq 0 to -ne 24.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Wednesday, October 1, 2014 7:38 PM
  • I think I did. The instructions seem pretty simple: Start powershell with admin privileges and run the script. I did both but was not prompted to reboot. As a matter of fact, nothing happened. No errors, just a new line. 

    If there is some "secret sauce" that needs to be added, to make the script work they should have included that in the instructions. (not sure why this site randomly makes my fonts small, sorry.)


    Wednesday, October 1, 2014 7:51 PM
  • Ran your code and got this as output:

    ServiceName      : E1G60
    MACAddress       : 08:00:27:B6:68:CE
    AdapterType      : Ethernet 802.3
    DeviceID         : 7
    Name             : Intel(R) PRO/1000 MT Desktop Adapter
    NetworkAddresses :
    Speed            : 1000000000

    ServiceName      : E1G60
    MACAddress       : 08:00:27:B6:68:CE
    AdapterType      : Ethernet 802.3
    DeviceID         : 7
    Name             : Intel(R) PRO/1000 MT Desktop Adapter
    NetworkAddresses :
    Speed            : 1000000000
    Wednesday, October 1, 2014 7:53 PM
  • I think I did. The instructions seem pretty simple: Start powershell with admin privileges and run the script. I did both but was not prompted to reboot. As a matter of fact, nothing happened. No errors, just a new line. 

    If there is some "secret sauce" that needs to be added, to make the script work they should have included that in the instructions. (not sure why this site randomly makes my fonts small, sorry.)


    That's because your current value is something other than null, 0, or 24. I posted a suggestion above on how you can adjust the script.

    As for the font changes, are you using Chrome? There's a forum bug that changes font size when backspace is pressed.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Wednesday, October 1, 2014 7:55 PM
  • This works if you change the key manually. I'm able to get the power save box to uncheck itself. I'm not sure what I'll need to set PNPCapabilities to for sysprep to preserve this setting. Apparently, there is some sort of bit filter applied by or because of sysprep, but I haven't gotten that far yet.
    Wednesday, October 1, 2014 7:56 PM
  • I think I did. The instructions seem pretty simple: Start powershell with admin privileges and run the script. I did both but was not prompted to reboot. As a matter of fact, nothing happened. No errors, just a new line. 

    If there is some "secret sauce" that needs to be added, to make the script work they should have included that in the instructions. (not sure why this site randomly makes my fonts small, sorry.)


    That's because your current value is something other than null, 0, or 24. I posted a suggestion above on how you can adjust the script.

    As for the font changes, are you using Chrome? There's a forum bug that changes font size when backspace is pressed.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    It works with 0,24 and NULL only, for a reason.

    Place a trace message to output the capabilities found.   If you are on 8.1 or 2012R2 then the capabilities can be different so the script may have to be updated.


    ¯\_(ツ)_/¯

    Wednesday, October 1, 2014 8:13 PM
  • By the way.  Wi-Fi adapters and some other are 16 which means not applicable.  The system cannot manage that device.


    ¯\_(ツ)_/¯

    Wednesday, October 1, 2014 8:17 PM
  • Yes. I'm using Chrome and backspacing seems to be what triggers the small fonts. I'll try modifying the script.
    Wednesday, October 1, 2014 8:18 PM
  • It works with 0,24 and NULL only, for a reason.

    Sure, but what if I wanted it to work for me? I have this value set to 288, so running this wouldn't do anything on my machines. Granted, I know what to set and how to set it, but what if I didn't?

    There should at least be a notification message when the script determines that there's nothing to set.


    Don't retire TechNet! - (Don't give up yet - 13,085+ strong and growing)

    Wednesday, October 1, 2014 8:18 PM
  • I'm not a powershell guy but I do see what you mean: The script only test for those two values of PNPCapabilites. Nothing happened because the adapter's PNPCapabilities didn't match the criteria. 
    Wednesday, October 1, 2014 8:52 PM