How to create a Second Home folder on a different server:

The below script creates a second home folder for currently logged on user. This is very useful when you want to keep two home folders for one user: 

REM ***START***

@echo off

echo **************************************************************************************
echo Script to Create Second Home Folder for currently logged on user account
echo **************************************************************************************

REM The following command executes to create second home folder for user.
md \\server_name\Studentworks$\%username2%

REM The following command share second home folder remotely for currently logged on user.

rmtshare \\server_name\%username%2$ = c:\studentworks\%username%2

REM Now assign permissions to currently logged on user (Full Control)

xcacls.vbs \\server_name\studentworks$\%username%2 /g “domain_name/%username%”:F

REM Now map second home folder to J:\ drive.

net use j: \\server_name\studentworks$\%username%2

REM ***End***

5 thoughts on “How to create a Second Home folder on a different server:”

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>