Windows Server 2012 and Group Policy VBS Logon Scripts


  • We recently replaced some Windows 2008 R2 EE servers with Windows Server 2012 DCE servers.

    We use GPO User Policy to kick off logon scripts written in VBS to map some drives depending on group membership.

    The logon script executes correctly on all remaining Windows 2008 R2 Servers and Windows XP and Windows 7 clients.

    It does not show any mapped drives in File Explorer on Windows Server 2012. But, if I use a sub-dialog that engages the File Explorer shell, such as when deciding on the location for a new Hyper-V machine location, I can see all the drives that are mapped.

    So at first, it appeared the mappings were not executing at all, but now it appears that they are simply hidden from view in File Explorer and most other ways to access the files system.

    I remember with Windows Server 2008 R2 and Windows 7 (and Vista) you had to EnableLinkedConnections in the registry at the key:


    Add a key EnableLinkedConnections Setting a DWORD value to = 1

    I am not sure if this still applies in Windows Server 2012 and also while that key technically exists, the key is named policies with a lowercase 'p'.

    Although that is a small thing, sometimes registry keys are case sensitive to the dll or application that is reading them or writing them.

    Any advice would be appreciated.

    Kind Regards!

    Friday, February 01, 2013 4:02 PM

All replies

  • Address your problem to Group Policz forum here



    Friday, February 01, 2013 11:23 PM
  • It is NOT a problem with Group Policy. Group Policy works completely correctly. The problem is Windows Server 2012 DOES NOT reflect the execution of VBS logon scripts that are being successfully delivered via Group Policy.

    The mention of Group Policy was merely to establish the delivery mechanism. The script execute successfully when executed manually. The seem to have been run as, if you would please read the post completely, you would see that in other File Explorer shell dialogs, the mapped drives are showing, but in File Explorer application they are not.

    Please read the entire post. If it needs to be put into another forum I will reports, but it is NOT a GROUP POLICY issue.

    Sunday, February 03, 2013 6:11 PM
  • Hi,

    Regarding mapping drive with Group Policy setting, please also refer to the method about GPP:

    Using Group Policy Preferences to Map Drives Based on Group Membership


    Nicholas Li
    TechNet Community Support

    Tuesday, February 05, 2013 9:38 AM
  • As much as I appreciate the replies folks, please read the problem before commenting.

    1. The GPO is mentioned because it is what initiates a VBS logon script. IT WORKS FOR ALL CLIENTS XP, and Windows 7 (Since they are all modified with the registry key setting 'EnableLinkedConnections=1' DWORD. I suspect this has to be applied to Windows Server 2012/Windows 8 for the script to execute, but on Windows Server 2012, the key name is slightly different in capitalization and I am not sure it applies or should be tampered with.

    2. If the above is not the issue, the script will execute with no problem when run manually after logon but does not show any mapped drives in File Explorer when run by GPO. It does however without manually executing the script (GPO invoked) show mapped drives when using a browse dialog, as in the case of selecting a folder for a Hyper-V child, but not in File Explorer.

    3. I am not experiencing any problem with group policy and choose to use logon scripts written in VBS to setup the initial user environment. I plan to convert this to powershell eventually. But right now they are VBS scripts.

     If you need me to elaborate, please let me know.

    • Edited by Joe_Admin Thursday, February 07, 2013 7:01 PM minor clarifications
    Thursday, February 07, 2013 4:47 PM
  • I am having the same issue. VBS script maps drives fine on win7, 2008, 2008R2 but nothing in server 2012. It is impossible to find anything on this issue.
    Thursday, February 07, 2013 5:46 PM
  • Tried the "EnableLinkedConnections" key you mentioned in both x86 and x64 but no love.
    Thursday, February 07, 2013 5:51 PM
  • So I just tried using group policy to map a drive and had the same results........ drives map fine on win7, 2008, 2008R2 but nothing in server 2012. ....Sure hope MS figures this one out soon!
    Thursday, February 07, 2013 6:09 PM
  • This sucks. Seems like every new release breaks things that were working. I have noticed how much faster the kernal is and how tightly everything is integrated with Powershell, but a lot of 10 year old annoyances are still around and several new breakages in things that worked okay.

    When is SP1 coming again? lol

    Thursday, February 07, 2013 6:58 PM
  • The EnableLinkedConnections=1 should correct the issue on Windows 7/Windows Server 2008 R2. Be sure you had restarted the machine after modifying the registry. I do not recall any other issues after this was set, the scripts would map drives visible to Windows Explorer.
    Thursday, February 07, 2013 7:05 PM
  • Map drives via VBS logon scripts have always worked fine on my win7 and 2008R2......server 2012 is where it fails.

    Thursday, February 07, 2013 8:24 PM
  • Hello everybody,

    I can report one more experience with this problem.

    I'm running Windows 2012 on a physical machine and on a VM, both have the problem - they can not map the network drives with the vbs logon script via "net use" although it does not deliver an error after executing it with the run-command.

    Any news how this can be solved ?

    Best regards !

    Thursday, February 28, 2013 9:05 AM
  • A few hours later, my problem is identified, in my case only users who are Adminstrators have the problem, has to do with UAC.

    A script from this page helped me to solve the problem:

    As I found also other reasons which causes the problem I add some more links here:

    Hope this helps someone else !

    Thursday, February 28, 2013 12:31 PM