Windows Server 2003 Login Script

All,

Can someone please give me an example of a .bat script that will create a mapped drive based on someone's username?  For example, if my name is John Doe, and my username is jdoe, and I have a user folder called jdoe in the Users folder on the data drive of the server, what would be the command to put into a .bat in order to map the drive everytime I log in?  I have approximately 65 users, and would like to automate this for each user, without them having a broad mapped drive to the Users folder.

Thanks!
SroboAsked:
Who is Participating?
 
WpgComputerGuyConnect With a Mentor Commented:
In a batch file, you could use the line:

net use X: \\servername\share\%USERNAME%

X is whatever drive letter you want to map.
0
 
oBdACommented:
Simply define the share in the user's profile in ADUC as home drive with the according letter. The drive will then be mapped automatically.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.