[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

establishing connection from a command line

Posted on 2014-08-21
8
Medium Priority
?
423 Views
Last Modified: 2014-08-22
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.
0
Comment
Question by:axcx
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40276802
Replace Local Area Connection if it is named differently

netsh interface set interface "Local Area Connection" disabled

netsh interface set interface "Local Area Connection" enabled

Open in new window

0
 
LVL 8

Expert Comment

by:Jayaraja Jayaraman
ID: 40276804
ipconfig/release will disconnect
ipconfig /renew will reconnect
0
 
LVL 22

Expert Comment

by:Christopher McKay
ID: 40276810
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
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:axcx
ID: 40277045
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.
0
 
LVL 58

Expert Comment

by:Gary
ID: 40277070
Well the solution is above.
0
 
LVL 22

Accepted Solution

by:
Christopher McKay earned 2000 total points
ID: 40277073
Is this what you're looking for?

http://support.microsoft.com/kb/555935

Hope this helps!

:o)

Bartender_1
0
 

Author Comment

by:axcx
ID: 40278457
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.
0
 

Author Comment

by:axcx
ID: 40278644
Rasdial does the trick. But because your comment helped me find the solution I accept it.
0

Featured Post

Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

WARNING:   If you follow the instructions here, you will wipe out your VTP and VLAN configurations.  Make sure you have backed up your switch!!! I recently had some issues with a few low-end Cisco routers (RV325) and I opened a case with Cisco TA…
This article explains the fundamentals of industrial networking which ultimately is the backbone network which is providing communications for process devices like robots and other not so interesting stuff.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question