Map drive for any user that logs into a pc

I want to map a drive for any user that logs into two pc's.  I am not sure how to do it with group policy, or if it can be done in an easier way.  The server is a 2003 server, and we are a 2008 domain.
asrvwizAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

achaldaveCommented:
create drive mapping script (.bat file) and put it in startup folders (C:\Documents and Settings\All Users\Start Menu\Programs\Startup\) of all users on both PCs.

here is the batch file command
net use X: \\server\share

replace X with available drive letter you want to use on that PC and \\server\share with actual path.
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
You'll need a logon script that runs for the computers you designate.  You can use the following to create a logon.bat file:

net use f: /D  ' Deletes any mapped instance of drive f:, use a drive letter of your choice here'
net use f: \\servername\filepath ' Maps drive f: to the share'

Then you simply create an OU (Organizational Unit) in Active Directory, move the computers you want to run the script into that OU and then use the group policy management console to create the policy that will run the script if any computer in that OU logs on.

You will find this helpful: http://technet.microsoft.com/en-us/library/cc779329(v=ws.10).aspx
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
GeodashCommented:
Set the Group Policy to map to the PC the drive
http://www.howtogeek.com/99403/it-how-to-map-network-drives-on-windows-clients-via-group-policy/


If you are on a 2008 domain, manage your GPO's from the 2008 DC, not 2003
0
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

asrvwizAuthor Commented:
I tried net use g:\server\share from a batch file when the user was logged in and it said bad user name or password.  I used GPO with a user group and it worked, so I know that the credentials are good, but I only want it on these two PC's.

The PC's can not be moved out of the OU, they get printers based on that now.
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
Create an OU that is below the OU that they are in.  The GPO from the upper level OU will still apply.
0
achaldaveCommented:
Are you trying to pass credentilals from batch file? What happens if user types \\server\share in run window?

The correct sytext for net use command is

net use X: \\server\share not net use X:\server\share
0
GeodashCommented:
If you want every user to have the mapped drive, why would you be worried about credentials?
0
asrvwizAuthor Commented:
Yes the net use g:\ was a typo on my part.  

I want the drive mapped for all users that log on to two specific PC's.

I looked at the howtogeek link, not sure how that works since I did not see them use any item level targeting?
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
To pass credential in the batch file:

net use f: /D
net use f: \\server\share password /USER: domain\username

I definitely do not recommend doing this as is exposes the users password in a plain text file.
0
GeodashCommented:
If you are server 2008, why would you create a bat file to do this instead of using the mapped drives feature in GPOs?

Assign a mapped drive to all users, mapping that drive to an OU containing the PC's you want to have. You can target the PC's in the GPO. Basically it would say, if "any user" logs into ANY PC in this OU, map this drive.

You can lock it down to an OU, no bat files, no exposed passwords...done.
0
asrvwizAuthor Commented:
Geodash,

Are you saying that I create a GPO and target the PC's I want to map the drive on?  Was not sure that would work?
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
That's how it's done.
0
GeodashCommented:
It should work. Target the OU that the 2 PC's are in, under your main OU. Assign all users to the policy. When they login to the PC, it should work. To make sure, create 2 new test objects, link them in the same way, and run a RSOP on the objects. This way you can test without moving your PC's until you have fully tested.
0
asrvwizAuthor Commented:
Geodash,

I am confused, I do not want to move the PC's out of this OU.  I want users who are a member of a group to map a drive when they log into 2 out of the 15 PC's in that OU.  Do I not have to use loop back processing to do this?
0
Frank McCourryV.P. Holland Computers, Inc.Commented:
Domain
 |___OU - Where Printers are assigned
        |___OU - Where you will do drive mappings

This will cascade your GPO's ensuring that your Printers are mapped and that the 2 PC's in the subordinate OU will be the only ones to get the GPO that maps the drives
0
asrvwizAuthor Commented:
OK I created the GPO targeted a test user and in the security filtering I put the PC, and linked it to the OU.  Is this correct?
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.