Connect to existing VPN connection using PowerShell
Posted on 2010-09-15
I am doing some systems automation with powershell and have a situation where I need to connect to several different VPN connections based on the remote servers I need to work with.
Since we can not (for security reasons) leave the VPN connections open, I just want to open the VPN session using PowerShell and when the processes are done, close the connection.
The VPN is a standard MS VPN connection on Windows 7 or Windows Server 2008 (& 2008 R2)
The VPN connections have already been configured, so I just simply need to connect.
I am hoping someone can steer me in the right direction on how to open and close connection.