Running a Logon script through VPM

Posted on 2010-01-07
Medium Priority
Last Modified: 2012-05-08
I am trying to get a user connection through VPN to have their Profile logon script run. We are not using any "VPN Software" just the Windows SBS 2008 VPN. The script listed below is just to map 1 drive.
What steps do I follow to get this to run on VPN Connection?

net use q: /delete
net use q: "\\12Nov2008\Company Files"

Question by:LostInWindows
LVL 78

Accepted Solution

Rob Williams earned 1200 total points
ID: 26200114
The only way to have it work automatically is if the remote computer joined to the domain. If so, at logon there will be a check box "log on using dial-up connection. Check that and then you will be presented with the option to use the VPN to connect. This then allows the VPN to connect before logon completes. After authentication group policy and logon scripts are then applied.
On occasion you have to use the following group policies to "tweak" the connection because VPN's are considered slow links.

Computer Configuration | Administrative Templates | System | Logon  | Always wait for the network at computer startup and login
Computer Configuration | Administrative Templates | System | Group Policy | Group Policy slow link detection
Computer Configuration | Administrative Templates | System | Scripts | Run logon scripts synchronously

If the computer is not a member of the domain, the only option is to have a logon.bat file somewhere such as the user's desktop for them to click after the VPN is connected, which will then map the drives.

The script/bat file would usually look similar to:
Net Use /persistent:no
Net * /delete
Net Use Z: \\ServerName\ShareName  

With VPN's name resolution doesn't always work perfectly so the last line is better replaced using the Server's IP such as:
Net Use Z:  \\\ShareName

Assisted Solution

powereds earned 800 total points
ID: 26200205
Hi LostInWindows,

In this case I think you just need to create a batch or vbscript to mount the network drive.
Just let them run the script then connect to vpn before accessing the drive.

Hope this helps.

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’m often asked about newer and larger USB drives connected to SBS2008 and 2011 failing Windows Server Backup vs the older USB drives not failing. As disk space continues to grow and drive technology change SBS2008 and some SBS2011 end up with the f…
I recently attended Cisco Live! in Las Vegas, a conference that boasted over 28,000 techies in attendance, and a week of hands-on learning hosted by a solid partner with which Concerto goes to market.  Every year, Cisco displays cutting-edge technol…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question