[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 435
  • Last Modified:

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!
0
Srobo
Asked:
Srobo
1 Solution
 
WpgComputerGuyCommented:
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

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now