Windows 10 requires at least 3 clicks in various locations to connect a VPN using the built-in client. Make life easier on your end users by dropping a batch file on their desktop that dials the VPN, maps the appropriate drives and then pops them open in windows explorer.

<connectionName> is the name of your saved VPN connection
<\\server\share> is the location of the drive you want to map
<driveLetter> is the drive letter you want to connect to

Batch file looks like this:

rasdial <connectionName>
net use <\\server\share> /delete
net use <driveLetter> <\\server\share>
start <driveLetter>

The second line that disconnects another share using that drive letter isn’t necessary but I usually put it in there just in case. Also, I usually use the IP address of the server instead of its name just in case there is an issue with name resolution 🙂

LEAVE A REPLY

Please enter your comment!
Please enter your name here