

Set objWMIService = GetObject("winmgmts:!\\" & strComputer & "\root\cimv2") Set objDrive = objNetwork.EnumNetworkDrives Orgunit = Right(arrPath(1), intNameLength) 'as the OU is returned in the format OU= we have to remove the first 3 characters StrDN = objRecordSet.Fields("distinguishedName").Value 'get the OU to which the user belongs and put it in the orgunit var ObjCommand.CommandText = "SELECT distinguishedName FROM 'LDAP://dc=exchange,dc=DOMAIN,dc=co,dc=uk'WHERE objectCategory='user'AND sAMAccountName='" & strUser & "'" ObjCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE ObjCommand.Properties("Page Size") = 1000 StrUser = objNet.UserName ' get the logged on user's username Set objNet = CreateObject ("WScript.Network") Set objCommand.ActiveConnection = objConnection

ObjConnection.Open "Active Directory Provider" Set objCommand = CreateObject("ADODB.Command") Set objConnection = CreateObject("ADODB.Connection") MapDrive = True 'By default, map the drive Text '=ĭim objDrive, intDrive, intNetLetter, colDisks, objDisk,objWMIService,strComputer I'm sure I'm missing something simple though. I've scoured Spiceworks too and tried several of the methods found. gpresult /r shows it being applied to my workstation even when this shortcut does not show up. I tried using User Configuration rather than Computer Configuration to make the link.

When I double click, the computer thinks it is a file and asks me what program I want to open it in. The only way I can get this to show up on my desktop is to target my computer. I've told it to go to All Users desktop and told it where to link to. I am testing it on myself before adding anybody else. I want to use Group Policy to target that user group and create the folder shortcut. These users are in their own AD security group. We have a network shared folder that needs to be added to the desktop of certain users. Okay I've used what knowledge I have and supplemented with a couple hours research and cannot get this to work.
