• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

schedule to turn on Ethernet port

My computer have two lan port which connect to difference access point . is there any way to schedule to turn on one port at morning 0700rs and turn off at evening 1800hrs than turn on another port at 1815hrs and turn off at 2200hrs. and the schedule can repeat daily
  • 2
1 Solution
Gerwin Jansen, EE MVETopic Advisor Commented:
This is possible using wmic commands. Once you get this working, you could put them in a .cmd file that you schedule to run at certain times.

First: get the correct index numbers for your 2 network interfaces using:
(from an elevated command prompt)
wmic nic get name, index 

Open in new window

You will get a list of network interfaces, note the number of the correct interface(s).
Then, to disable:
wmic path win32_networkadapter where index=9 call disable

Open in new window

9 is an example here, you will probably have different numbers.

Disable one, enable the other:
wmic path win32_networkadapter where index=9 call enable
wmic path win32_networkadapter where index=11 call disable

Open in new window

kianhowAuthor Commented:
Gerwin Jansen, EE MVETopic Advisor Commented:

Why the 'B' grade if I may ask?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

We Need Your Input!

WatchGuard is currently running a beta program for our new macOS Host Sensor for our Threat Detection and Response service. We're looking for more macOS users to help provide insight and feedback to help us make the product even better. Please sign up for our beta program today!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now