Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I enable/disable a network connection from the command-line or MS-Dos?

Tags:

batch-file

I want to enable/disable a network connection from the command-line in Windows 8.

netsh interface set interface “Local Area Connection” DISABLED 

To enable the interface, you'd then run:

netsh interface set interface “Local Area Connection” ENABLED 

When I try this, it generates an error message which states that "no more data is available".

like image 721
user3606575 Avatar asked Sep 17 '25 03:09

user3606575


1 Answers

This may be enough for you if you are using DHCP.

Disable:

ipconfig /release *

Enable:

ipconfig /renew
like image 114
foxidrive Avatar answered Sep 19 '25 00:09

foxidrive



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!