Link to home
Start Free TrialLog in
Avatar of bsohn417
bsohn417

asked on

Group Policy Login Script to Map Drive for Users in Multiple OUs

The environment I am currently working on maps drives via group policy.  All users in each OU have their own login script.  I need to map a drive for users in multiple OUs.  

1)  What would you recommend be the best approach to a situation like this?  

2)  Is filtering the login script GPO based on group membership the way to go?  

3)  If so, how would this affect the performance of group policy processing?  
Avatar of bsohn417
bsohn417

ASKER

Come to think of it, it might be best to modify the existing scripts and to map the drive based on group membership.  Anyone have the syntax handy to add to a VBScript script?

On Error Resume Next

' *** Drive Map Letters and Paths ***

strDriveLetter1 = "N:"
strDrivePath1 = "\\Nas01\Network Applications"

strDriveLetter2 = "L:"
strDrivePath2 = "\\Nas01\Staff Data\Justice Action Center"

strDriveLetter3 = "H:"
strDrivePath3 = "\\Nas01\Staff Data"

strDriveLetter4 = "G:"
strDrivePath4 = "\\Nas01\Student Data\Law Review"


' ************************************


Set objNetwork = CreateObject("WScript.Network")

' *** Section which removes drives before mapping
objNetwork.RemoveNetworkDrive strDriveLetter1
objNetwork.RemoveNetworkDrive strDriveLetter2
objNetwork.RemoveNetworkDrive strDriveLetter3
objNetwork.RemoveNetworkDrive strDriveLetter4

' *** Section which maps drives
objNetwork.MapNetworkDrive strDriveLetter1, strDrivePath1
objNetwork.MapNetworkDrive strDriveLetter2, strDrivePath2
objNetwork.MapNetworkDrive strDriveLetter3, strDrivePath3
objNetwork.MapNetworkDrive strDriveLetter4, strDrivePath4

' *** AuditWizard Audit Scan ***
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Set f2 = fso.GetFile("c:\station.a2k")
f2.Delete
Set objShell = CreateObject("WScript.Shell")
objShell.Run chr(34) & "\\nas01\network applications\auditwizard\network scan\scan32.exe" & chr(34)
ASKER CERTIFIED SOLUTION
Avatar of Mark Pavlak
Mark Pavlak
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Netman66
Netman66
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial