Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to automate VPN connection to come ON nightly so that a database can replicate, then I would like to have it turned off. I know how to schedule Tasks, but is there a command line interface for the VPN connections? or how to turn this on/off?

share|improve this question
    
add comment

1 Answer 1

It's a little bit of a process, but yes it can be done.

Create a VPN connection, save the username and password. Save the username and password. Disable the requirement to display progrss while connecting. Disable the "Prompt for name and password, certificate, etc".

Create a shortcut to the network connection. Save it somewhere handy. Create a batch file which simply has the name of the .lnk file in it. If the .lnk file is called "corp_vpn.lnk" the file should look like:

corp_vpn.lnk

Then have it mirror the data.

To disconnect automatically, set the idle timeout (probably set it nice and high) and it'll connect and disconnect as needed.

share|improve this answer
add comment

Your Answer

 
discard

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.