How to map a drive based only on OU membership

Posted on 2009-04-22
Medium Priority
Last Modified: 2012-05-06

First, I am hopeless with writing logon scripts, but I know how to implement them  :-)

Can anyone point me to a vbs script that I can use to map a network drive based on a user's OU membership only?

Basically, OU1 users map to \\server\share1, OU2 users map to \\server\share2, OU3 users map to \\server\share3 etc etc

Also, I need the script to map another drive so all users get access to a common share  - eg \\server\public

Any help/code is much appreciated and it would be cool if this could be done in one script  :-)
Question by:JamieD71
LVL 70

Accepted Solution

KCTS earned 1200 total points
ID: 24202570
LVL 18

Assisted Solution

Americom earned 800 total points
ID: 24204478
You can map drive based on OU by creating a logon GPO and link to the OU where the users are. If you have 10 departments with 10 OUs, you would need 10 GPOs. If you have another 50 drives to map to cross-department shares, you would need 50GPOs...If those OUs are not in parallel but nested from each other by locations and department etc, you would have to worry and troubleshoot  inhertance and block inheritance etc. Hight Maintenance....the more GPOs you have the slower it will be during logon and GPO takes up space on your SYSVOL. Generally you would map drives based on group membership and not OU, this way it would be much more flexible, scalable, and managable.

Author Closing Comment

ID: 31573174
Thanks for both responses.  I think, given the simple structure of our AD at the moment, I shall map based on OU.  This is more time based contraints than enything else.  Will be looking at group based mapping afterwards...

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here's a look at newsworthy articles and community happenings during the last month.
Microsoft Office 365 is a subscriptions based service which includes services like Exchange Online and Skype for business Online. These services integrate with Microsoft's online version of Active Directory called Azure Active Directory.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Suggested Courses

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question