Jump to content

Multiple mapped drives


Recommended Posts

Hi Guys,

I need some help with mapping network drives via active directory.

Basically I have two servers. Server one is my AD server and Server two is my file server. Server 2 has about 4 shared directories which are mounted as shared drives on that server. These shared drives have group permissions, ie, group A and group B, which also exists in AD under groups.

I need to find a script that will allow me to mount these drives automatically when a user logs on. In other words, if user1 belongs to group A, then I would like group A drives to be auto-mounted once the user logs in.

I had a login script that accomplished this for 1 drive and one group by using the GPO login script under Group Policy ->Windows settings ->Login script but this same script is not working for multiple shared drives.

Anyone have a script I can edit or can someone direct me to a script I can use to test out my scenario?

Thanks in advance.

Link to comment
Share on other sites


Here is a script that I have used/modified to work wonderfully for many of my clients.

http://lazynetworkadmin.com/content/view/7/6/

No editiing of the script is necessary, just add the information to the csv file and the script will map the drives based off of AD group membership.

Thanks a lot for that script...It looks pretty neat. I can read scripts and almost any programming language but I'm not good at writing them. I will give this a try in a few.

One quick question. Do I load both the .vbs and .csv files to AD->Group Policy->User Configuration->Windows Settings->Scripts(logon/logoff)?

Link to comment
Share on other sites

no you just load the .vbs file there.. both files should go in the netlogon folder on the logon server(global catalog)

I actually just modified it to make the connection persistent, I forgot I did that earlier last month and never updated it on the site. copy it again so you get the update.

Link to comment
Share on other sites

no you just load the .vbs file there.. both files should go in the netlogon folder on the logon server(global catalog)

I actually just modified it to make the connection persistent, I forgot I did that earlier last month and never updated it on the site. copy it again so you get the update.

Oh okay...So the only thing to edit is the .csv file? Does this look right? or or should I leave Group name alone. It looks like I should be replacing X with a drive letter but I'm not sure. What about !!? Thanks in advance.

Group A,x:,\\my-fs\share

Group A,!!,\\myads\printer1

Link to comment
Share on other sites

Ha...I figured that was the right way to set it up. X = M, etc. I have 5 drives to mount so using X for all wont' work.

How about the printer (!!)? And I'm still only editing .csv right?

Thanks

Link to comment
Share on other sites

yeah.. the !! just tells the script it is a printer.. obviously no drive letter... and yes.. only the csv file

A little disappointed...I'm not sure what I did wrong but the script didn't work for me. I uploaded both files to the netlogon share, which opens up by default when I click browse. I then added just the logon.vbs and hit okay but non of my drives got mounted automatically.

This is kind of how I have it setup. I uploaded the logon.vbs without changing anything and then I edited the grouplist.csv as follows. In my AD I have a couple of groups. Almost all users belong to GroupA, GroupA also has read/write permissions on the shared drive on rob's-server\share1 but rob's server is not the AD server but this should matter right? I really need this thing to work...too many users to manually mount the drives. No error message either so I don't know what to diagnose, any help will be greatly appreciated.

----------CSV FILE CONTENTS----------

GroupA,M:,\\robs-server\share1

----------CSV FILE CONTENTS----------

Link to comment
Share on other sites

-- Go to http://www.kixtart.org/ and download the latest version of KiXtart.

-- Create a KIX directory on your NETLOGON share. Copy KIX32.EXE and WKIX32.EXE to that directory.

-- Create a logon.bat batch file in your NETLOGON share with the following:

@ECHO OFF
%0\..\KIX\KIX32.EXE %0\..\logon.kix
EXIT

-- Create a logon.kix script file in your NETLOGON share with the following:

If InGroup("GroupA")
Use M: "\\robs-server\share1"
EndIf

-- Modify the user's domain account to add logon.bat as a Logon script on the Profile tab

Link to comment
Share on other sites

If you look up near the top of the script.. you can comment out the on error resume next and that will give you errors if it finds a problem.

The only other thing I can think of is you need WSH 5.6 installed for it to work. that shouldnt be a problem because most all computers already have that installed. Some windows 2000 machines do not

Link to comment
Share on other sites

If you look up near the top of the script.. you can comment out the on error resume next and that will give you errors if it finds a problem.

The only other thing I can think of is you need WSH 5.6 installed for it to work. that shouldnt be a problem because most all computers already have that installed. Some windows 2000 machines do not

Hey, the script actually worked...I misspelled the group name and that gave me a headache for 2 days but I finally saw it and all is well now. Thanks a lot.

One little thing though...I used the script to mount a network printer but when I right click the printer from the client pc and go to printer preference, it give an error. Something about "not being able to display all the settings". Have you encountered this problem?

Link to comment
Share on other sites

glad to hear the mapping the drives are working.

Not I havent had that problem but it sounds like the script did its job. It sounds more now like a driver problem. Check and make sure that the driver is compatible or that it loaded correctly.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...