Creating new GPO for mapped network drives but GPO not applying saying... - TechRepublic
Question
September 8, 2010 at 09:14 AM
pctx

Creating new GPO for mapped network drives but GPO not applying saying…

by pctx . Updated 15 years, 9 months ago

it has not applied because the GPO was filtered out for being |empty|.

Our network:

Server 2008
XP SP3 clients

Go into the GPM and create a new GPO. I then go into edit the thing and paste in my VB script.

For reference, here’s the script:
————————————-

‘ WanerPacificLOGIN.vbs
‘ VBScript to map a network drive to the UserName.
‘ Author Aaron H. Warner Pacific Helpdesk http://helpdesk.warnerpacific.edu/
‘ Version 1.03 – Setember 7th, 2010
‘ —————————————————————–‘
Option Explicit
on error resume next
Dim objNetwork, strRemotePath1, strRemotePath2, strRemotePath3, strRemotePath4, strUserName
Dim strDriveLetter1, strDriveLetter2, strDriveLetter3, strDriveLetter4

strDriveLetter1 = “G:”
strDriveLetter2 = “H:”
strDriveLetter3 = “I:”
strDriveLetter4 = “S:”
strRemotePath1 = “\\resources\groups”
strRemotePath2 = “\\resources\home”
strRemotePath3 = “\\backups\backups”
strRemotePath4 = “\\resources\shared”

Set objNetwork = CreateObject(“WScript.Network”)

‘Remove original Drive
objNetwork.RemoveNetworkDrive “S:”
objNetwork.RemoveNetworkDrive “I:”
objNetwork.RemoveNetworkDrive “H:”
objNetwork.RemoveNetworkDrive “G:”

WScript.Sleep 3000
‘ Section which maps 4 drives, G:, H:, I: and S:
objNetwork.MapNetworkDrive strDriveLetter1, strRemotePath1

‘ Here is where we extract the UserName
strUserName = objNetwork.UserName
objNetwork.MapNetworkDrive strDriveLetter2, strRemotePath2 _
& “\” & strUserName

objNetwork.MapNetworkDrive strDriveLetter3, strRemotePath3 _
& “\” & strUsername

objNetwork.MapNetworkDrive strDriveLetter4, strRemotePath4

‘ End of MapNetworkDrive Example logon script.
wscript.echo “done”
———————————-

Reason I have it echo “done” in a window is to see if it ran. I know using GPresult (either through the GPMT or on the client) I can tell if the policy applied or not.

I spent almost 8 hrs on this yesterday and am hitting a brick wall. If I run this script on the client machine it works fine. I can navigate to the sysvol folder and run the script and it works just fine. Permissions are not the issue it seems.

For whatever reason though I seem to remember there being some issue calling a vbscript stand alone via GPO.

Anyways, any help would be awesome. Thanks guys!

This discussion is locked

All Comments