Auto connect VPN before RDP

@echo off
SET VPN_NAME="<VPN NAME>"

:: Connecting to VPN...
rasdial %VPN_NAME% <USER> <PASS>
timeout 5
echo Running RDP...
"<RDP FILE>.rdp"

echo Finished - disconnecting from VPN...
rasdial %VPN_NAME% /disconnect

 

Leave a Comment

Your email address will not be published. Required fields are marked *