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

By Pctx ·
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 conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

I don't see anything wrong

by neilb@uk In reply to Creating new GPO for mapp ...

If you edit the GPO, User Configuration | Windows Settings | Scripts (Logon/Logoff) and open Logon to get the Scripts List and then click [Show Files], do you see your script?

Silly one - and if you do, is the name correct and matching the name in the Scripts List?

Collapse -

where in the domain structure are you appling the GPO?

by CG IT In reply to Creating new GPO for mapp ...

if it's domain wide, then it should be linked to the domain [really make it a log on script], if it's for specific users, should be linked to an OU that has the users you want to get it in the OU.

side note: if you don't already know, log on scripts can substantially slow down the log on process.

Related Discussions

Related Forums