Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

How To Create A Second Home Folder On A Remote Server


Author: Nirmal Sharma MVP

View products that this article applies to.

Summary

This article explains how you can use a small script to create a second home folder for a user for disaster recovery purpose.

↑ Back to the top


More information

You can use a small script to accomplish this task.

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 Script to Create Second Home Folder for currently logged on user account

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***

Please note: You must have the following tools available: Xcacls.vbs, rmtshare.exe

↑ Back to the top


Community solutions content disclaimer

Microsoft corporation and/or its respective suppliers make no representations about the suitability, reliability, or accuracy of the information and related graphics contained herein. All such information and related graphics are provided "as is" without warranty of any kind. Microsoft and/or its respective suppliers hereby disclaim all warranties and conditions with regard to this information and related graphics, including all implied warranties and conditions of merchantability, fitness for a particular purpose, workmanlike effort, title and non-infringement. You specifically agree that in no event shall Microsoft and/or its suppliers be liable for any direct, indirect, punitive, incidental, special, consequential damages or any damages whatsoever including, without limitation, damages for loss of use, data or profits, arising out of or in any way connected with the use of or inability to use the information and related graphics contained herein, whether based on contract, tort, negligence, strict liability or otherwise, even if Microsoft or any of its suppliers has been advised of the possibility of damages.

↑ Back to the top


Keywords: KB556070, kbhowto, kbpubtypecca, kbpubmvp

↑ Back to the top

Article Info
Article ID : 556070
Revision : 1
Created on : 3/4/2008
Published on : 3/4/2008
Exists online : False
Views : 448