Link to home
Start Free TrialLog in
Avatar of tshdennis
tshdennisFlag for Canada

asked on

how to automate the creation of a new share name on an existing user home directory

I need a script that will automate the addition of a new share name.  Presently the home directories are name 'FirstInitialLastname' and shared 'FirstInitialLastname$'  i want to add a new share of 'Firstname.Lastname$' for all my users on Windows server 2008r2
Thanks
Avatar of ekleiner
ekleiner
Flag of United States of America image

Unless you have a specific reason for using a separate share for each user, why do something like \\servername\users$\username. This way you will not have to create a separate share for each new user and will only have one to manage.
Avatar of tshdennis

ASKER

I don't understnad where you are coming from here.

We are moving to a new user name convention of Firstname.Lastname from firstInitialLastname.
the logon script could be change to find the present share name, but i am not sure how that is done.  To map their home directory in the logon script we are using:  net use u: \\pcserver2\%username%$
ASKER CERTIFIED SOLUTION
Avatar of ekleiner
ekleiner
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you.  I can see that this would be very efficient.  But I still need to rename all the home directories.  I would like to be able to script that job but I am not very familiar with scripting.  Can you assist me with that?

Thanks
SOLUTION
Avatar of Coralon
Coralon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial