Link to home
Start Free TrialLog in
Avatar of Malamamoto
Malamamoto

asked on

multiple mapped drives per OU

I have a client that wants a different mapped drive for every department in their company.  Such as, manager, accounting, HR, etc.

How can I create a GPO or a logon script to create a mapped drive for their profile according to the AD group that they're a member of?

For example, when members of the "Manager" group logs in I'd like the Z: drive, Y: drive, X: drive, mapped to different shared folders.
When members of the "POS" group logs in I'd like just the Z: drive to be mapped.

Get what I'm going for?  Of course, I'd rather use GPO rather than a logon script.

Thanks
Avatar of Rob Williams
Rob Williams
Flag of Canada image

The best bet in this situation is a single batch file but use the IfMemember tool from the windows resource kit. This way the drive is assigned to a user only if they are a member of the group specified. You can have a series of these commands within one batch file. If you don't want the whole resource kit you can download from:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=07C2F6D7-815E-4FA0-9043-4E4635CCD417&displaylang=en

Sample script:
http://lists.samba.org/archive/samba/2001-September/028948.html
I would do this with Group Policy Preferences. You will need to installed the client side extensions in you are using XP. You will also need one Win2008 or Win7 computer to create the policy with.
ASKER CERTIFIED SOLUTION
Avatar of Olaf De Ceuster
Olaf De Ceuster
Flag of Australia 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
Avatar of Malamamoto
Malamamoto

ASKER

Windows Server 2003

I'd rather use Group Policy, rather than a logon script.  :)
I generally agree, but if you have a lot of groups it may be a lot of OU's.
You can use Group Policy preferences with Windows 2003. You just need a Win7 or Win2008 computer to create the policy.
I hate the idea of using ifmember, though it would work.

Create a separate Group Policy for each drive that you want to map. Use either drive map preferences as stated above or create a simple logon script like

::map_z.cmd
net use z: /del
net use z: \\server\sharename

Assign the group policy to the domain. Under security filtering for the GPO, remove Authenticated Users and add the groups that you want it to apply to.

I've attached a screen shot from one of my GPOs.
drive-mapping-GPO.png
I have to agree IfMember is crude, it is an NT tool don't forget. But my point being you could create a script for 50 groups faster than 50 policies. There was no mention of the number of groups. If manageable I would certainly use group policy as well.
There will only be approx 5 group that will need to be managed.  And since I'm using Server 2003...I'll need to use logon scripts correct?

Ok, how can I do this?  Thanks!
just prepare small vns script files for each ou

then create share folder
palce allscript here
then go ou policy

go to user configuration go to  logon
and their give universal path of resp ective script file of ou like //servername/scriptfilename (share folder which have script files)


then run gpupdate force


ask users to logoff and login again



....................







Set objNetwork = CreateObject("WScript.Network")
objNetwork.MapNetworkDrive "H:" , "\\server name\sharename"


cr