# Solved: New logon script on server 2003



## lufkinp6 (Aug 1, 2005)

Hello, I am trying to make a log on script that looks to see what the username is that is loging on. and then takes that and maps their documents. for example. I log on with the user name tlufkin. Their documents would be located on my server at \\server\tlufkin. How can i get the script to do this. but change the location depending on who is logging on. A working example would be great. Thanks in advance for any help.


----------



## eventIDxxx (Jan 3, 2011)

Try something like this:

net use H: \\server\%username%

But u can assign the folder in AD user profile settings, Home folder


----------



## Rockn (Jul 29, 2001)

Why not just do folder redirection??


----------



## lufkinp6 (Aug 1, 2005)

what do you mean by folder redirection do you mean changing the my documents folder to their documents on the server every time they log on?


----------



## Rockn (Jul 29, 2001)

Folder redirection via Group Policy. It will redirect their My Documents folder to a location you choose on the server, it is a one time thing and will always be on the server. No scripting neccesary if you have Active Directory set up correctly.


----------



## lufkinp6 (Aug 1, 2005)

That sounds like a good idea can you give me some instructions on how to go about doing that. I love one time things. It makes the work so much easier.


----------



## Rockn (Jul 29, 2001)

This is basic network admin stuff. Look up folder redirection on Google because there is a lot more to it than simple instructions. You can also mess things up royally if you do not know what you are doing. Create a test user and a test OU in AD to start with and test out your redirection results.

You will also need to creat a share on your server for the redirection to go to. I generally create a share called redirection and give only authenticated users full access and let AD take care of the security for the new user folders created in that share.


----------



## lufkinp6 (Aug 1, 2005)

thanks for the help i got it up and running just fine.


----------

