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
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kianhowAuthor Commented:
Gerwin Jansen, EE MVETopic Advisor Commented:

Why the 'B' grade if I may ask?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.