Link to home
Start Free TrialLog in
Avatar of smpvm
smpvm

asked on

Auto Mapping of multiple shared folders via Active Directory

Hello Experts,

I need an urgent support, my Boss told me to Map 4 shared folders to 300 users in our company so that when they login to their computers these 4 shared folders should be automatically mapped into their computers. I don't have any idea how to do this auto mapping of multiple shared folders via Active Directory. I am using windows 2008 as Domain controller and All users are using windows 7 workstations.

The 4 Shared folders which need to be automatically Mapped are:-
1) \\192.168.10.153\Marketing$
2) \\192.168.10.153\Sales$
3) \\192.168.10.153\Home$
4) \\192.168.10.153\Registration$

Experts please help me with an easiest solution because i don't know much about scripting and coding.

Thank you for the excellent support we are getting from all the "Experts" around the world from Expert-Exchange community.

Regards,
SMV
Avatar of Anthony Carter
Anthony Carter

What you need is a script that has:

net use x: \\server_name\shared_directory_name

so:
@echo off
net use * /delete /yes
net use m:  \\192.168.10.153\Marketing$
net use n: \\192.168.10.153\Sales$
net use o: \\192.168.10.153\Home$
net use p: \\192.168.10.153\Registration$

Save the script as logon.bat and save it to the domain controller's NETLOGON share.

The deploy with active directory:

1) Open Active Directory Users and Computers
2) Right click domain name at top left and click Properties > Group Policy > Edit > User Configuration > Windows Settings > Scripts (Logon/Logoff) > Logon > Add...
3) Enter path to logon.bat (e.g., \\domain.local\sysvol\domain.local\scripts\logon.bat) and click OK three times
4) Login from workstation. Drives m, n, o and p should appear in My Computer.

For AD 2008+ there is an alternative:

http://blogs.technet.com/b/askds/archive/2009/01/07/using-group-policy-preferences-to-map-drives-based-on-group-membership.aspx
Avatar of smpvm

ASKER

Hello Anthony Carter,

Thank you for the support, I have about 2000 user in a OU, in which only specific 300 users should be linked with this script is that possible. i don't want this script to run for all the users in that OU because each users are belong to different departments.

Regards
ASKER CERTIFIED SOLUTION
Avatar of Anthony Carter
Anthony Carter

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