axcx
asked on
establishing connection from a command line
How can I connect or disconnect the internet using a command line? The connection is configured in a control panel. It is about turning it on and off.
ipconfig/release will disconnect
ipconfig /renew will reconnect
ipconfig /renew will reconnect
Are you wanting to disable the network connection? Or just communication to the internet? (But still communicate over the network?) the following must be run from an elevated command prompt. (Run As Administrator)
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call disable
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable
Change the NetConnectionID to match the interface you want to disable/enable.
Hope this helps!
:o)
Bartender_1
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call disable
wmic path win32_networkadapter where NetConnectionID="Wireless Network Connection" call enable
Change the NetConnectionID to match the interface you want to disable/enable.
Hope this helps!
:o)
Bartender_1
ASKER
In fact I want to reconnect a usb modem (dial-up connection to the internet). I can do it form an external app or control panel. But I want to do it from a command line.
Well the solution is above.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Very close but I everytime I execute rasphone -d <destination name> another window pops up and I have to press enter. I want to skip it.
ASKER
Rasdial does the trick. But because your comment helped me find the solution I accept it.
Open in new window