How to map a drive based only on OU membership

Posted on 2009-04-22
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

    LVL 18

    Assisted Solution

    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

    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

    Free book by J.Peter Bruzzese, Microsoft MVP

    Are you using Office 365? Trying to set up email signatures but you’re struggling with transport rules and connectors? Let renowned Microsoft MVP J.Peter Bruzzese show you how in this exclusive e-book on Office 365 email signatures. Better yet, it’s free!

    Join & Write a Comment

    Suggested Solutions

    Remote Apps is a feature in server 2008 which allows users to run applications off Remote Desktop Servers without having to log into them to run the applications.  The user can either have a desktop shortcut installed or go through the web portal to…
    Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
    This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
    This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

    729 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

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now