Jump to content
Compatible Support Forums
Sign in to follow this  
khurram

Disabling and Enabling network connections using CLI

Recommended Posts

Hello Everyone,

 

I want to disable and enable the wired connection (ethernet adapter) in my laptop though command prompt. I am trying to use PEAP using windows XP 802.1x client for user authentication and in some cases, the user will like to enter a different username and password. The 802.1x client in windows prompts for the username and password only when you take out the cable or disable and enable the ethernet connection.

 

So if anyone can tell me how can i disable and enable a specific interface in windows xp using the command line interface, I will be greatful.

 

Regards

 

Khurram

Share this post


Link to post

Hi,

 

I tried netsh and netsh interface but I could not find any command in that which disables or enables a specific interface. Mostly the commands are to set the parameters for an interface.

Share this post


Link to post

And if you drill down further in the help in "set", you will notice some more commands. Eventually, you would come up with something like:

 

Quote:
netsh interface set interface name="Local Area Connection" admin=ENABLED

Share this post


Link to post

Hi clutch

 

Thanks for your reply.

 

I tried this command

 

netsh interface set interface name="Local Area Connection" admin=ENABLED

 

But I get the following message

 

One or more essential parameters not specified

The syntax supplied for this command is not valid. Check help for correct syntax.

 

But if I try the following command, it works and the name of the interface is changed,

netsh interface set interface name="Local Area Connection" newname=LAN1

 

There is one more thing that it says in the help,

 

admin - whether the interface should be enabled <non-LAN only>.

 

But for newname it says,

 

newname - new name for the interface <LAN only>

 

I wonder does it mean that I can disable or enable only the logical interfaces and not the physical ones and can change the name for physical ones (as it worked for me)

 

Thanks again for your help and time. I highly appreciate this.

 

Khurram

[Edited by khurram on 2004-10-20 06:05:37]

 

Share this post


Link to post

thanks alot for replying again clutch. actually i want to make things easier for the end user .. and in case of devcon, they have to install a tool and then u can run the batch file containing commands to disbale or enable the lan ..

 

i wonder if there is any other way in windows XP and 2000 that user is prompted by 802.1x client to login the username and password useing PEAP ... i could trigger that login only when I take out the cable from LAN or when I disable it and then enable it again ..

 

regards

 

khurram

Share this post


Link to post

Enabling:

 

netsh interface set interface "Local Area Connection " ENABLE

 

 

Disabling:

 

netsh interface set interface "Local Area Connection " DISABLE

 

 

Ratnesh

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×