Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8307179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T18:28:32+00:00 2026-06-08T18:28:32+00:00

On some computers, the network adapters are, by default, configured with the allow this

  • 0

On some computers, the network adapters are, by default, configured with the “allow this device to wake the computer” option turned off. As a result, Wake on LAN won’t work.

I need to turn this option back on, but I can’t do it by hand – too many computers! So, I need to be able to do it via an API or with a script.

(Note: this is not a duplicate of How to Enable Wake On LAN programmatically because that question is about the BIOS setting whereas this one is about the operating system setting.)

I have an answer already using a batch script, but alternative solutions would be very welcome, especially if they use an API.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T18:28:33+00:00Added an answer on June 8, 2026 at 6:28 pm

    I found a solution on The Old New Thing. The powercfg command allows you to manipulate power settings, and in particular you can use the -deviceenablewake and -devicedisablewake to turn on and off the “Allow this device to wake the computer” option.

    You can see which devices are capable of doing this with this command:

    powercfg -devicequery wake_from_any
    

    You can see which devices have the option currently enabled using:

    powercfg -devicequery wake_armed
    

    Putting it all together, this is the batch script I’ve just started using to enable Wake on LAN:

    powercfg -devicequery wake_from_any | findstr /i "network ethernet" >adapters.txt
    for /F "tokens=*" %%i in (adapters.txt) do powercfg -deviceenablewake "%%i"
    powercfg -devicequery wake_armed | findstr /i "network ethernet" || goto :failed
    

    In this case, I’ve chosen to enable the option on all valid devices whose name contains the word “network” or the word “ethernet”; in some situations, of course, you might prefer to be more selective about which device(s) you enable.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So basically this code was working fine before. I had some computer issues and
I have two computers with Windows Server 2003. One computer has some shared folders
I have some computers on a network, the network is somehow serial, I mean
I have the host computer with Ethernet adapter configured by this way: IP address
I have two computers on a network. I'll call the computer I'm working on
When I try to install my software in some computers, I used to get
I am looking to do some synchronization between a couple of computers and a
I'm currently developing some computer-vision application for blind people. Now we decided to move
I am trying to read file and split its line to get some context(Computer
I have been working on a django app on my local computer for some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.