Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I make VPN connections using Vista's Connection Manager, and would like to disconnect the VPN connection from the command line so I can create a shortcut command called vpn.disconnect in Promptu Launcher.

How can I disconnect the VPN connection via the command line?

share|improve this question
up vote 6 down vote accepted

Check out Rasdial (part of Windows):


    rasdial entryname [username [password|*]] [/DOMAIN:domain]
            [/PHONE:phonenumber] [/CALLBACK:callbacknumber]
            [/PHONEBOOK:phonebookfile] [/PREFIXSUFFIX]

    rasdial [entryname] /DISCONNECT


So to hang up a vpn named 'The VPN' it'd be:

c:\>rasdial "The VPN" /DISCONNECT


share|improve this answer
Works great - thanks for your help! I would upvote your answer too, but I don't quite have enough points yet. – Dave Johnson Apr 23 '10 at 14:34
Using it with no entryname appears to disconnect everything; e.g. rasdial /DISCONNECT – derGral Jun 26 '12 at 6:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.