Disabling and Enabling network connections using CLI
This is a discussion about Disabling and Enabling network connections using CLI in the Windows Networking category; 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.
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
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
Participate in our website and join the conversation
This subject has been archived. New comments and votes cannot be submitted.
Oct 19
Jun 1
0
3 minutes
Responses to this topic
Check out
Quote:netsh /? and
Quote:netsh interface /?
Quote:netsh /? and
Quote:netsh interface /?

OP
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.
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.
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
Quote:netsh interface set interface name="Local Area Connection" admin=ENABLED

OP
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]
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]
http://www.winnetmag.com/Windows/Article/ArticleID/41111/41111.html
Scroll down to a response from yhamade referencing a tool named DevCon. This might do what you are looking for (for others interested, the command works fine with Windows Server 2003, and the version of netsh in XP may not support disabling in this fashion yet).
Scroll down to a response from yhamade referencing a tool named DevCon. This might do what you are looking for (for others interested, the command works fine with Windows Server 2003, and the version of netsh in XP may not support disabling in this fashion yet).

OP
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
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
Enabling:
netsh interface set interface "Local Area Connection " ENABLE
Disabling:
netsh interface set interface "Local Area Connection " DISABLE
Ratnesh
netsh interface set interface "Local Area Connection " ENABLE
Disabling:
netsh interface set interface "Local Area Connection " DISABLE
Ratnesh