Posted On February 28, 2021

How to Move C:\Users to Another Volume

kimconnect 0 comments
blog.KimConnect.com >> Windows >> How to Move C:\Users to Another Volume

Warning: this process will effectively re-route all file pointers from C:\Users\* to another volume. Windows is hard-coded to restore to this C:\Users directory; therefore, converting this folder into a junction will cause problems during system restores

Step 1: restart the computer into Recovery Mode (i.e. pressing F11 on HP laptops)

Step 2: At the system command Window, run these commands:

robocopy C:\Users D:\Users /mir /xj /copyall
ren c:\Users Users_old
dir c:\
d:\Users: mklink c:\Users d:\Users /j

Explanations:
a. D:\users is the new volume to replace C:\Users
b. /mir tells robocopy to mirror the directories, this will copy all files
c. /copyall will copy all the attributes includings ACL and Owner info
d. /xj is to direct robocopy to NOT follow junction points – this is absolutely necessary!
e. Rename C:\users (so that this change can be reverted)
f. Verify that the C:\Users directory has been renamed as a pre-requisite to replacing such object with a junction
g. Create a Junction from C:\Users to D:\Users
h. Exit the recovery console to resume Windows booting

Leave a Reply

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

Related Post

PowerShell: Remediate Microsoft Windows Unquoted Service Path Enumeration

Description The remote Windows host has at least one service installed that uses an unquoted…

Strategies to Free Up Disk Space C:\ Drive

1. Move pagefile away from system drive (optional) 2. Turn off System Restore (warning; this…

PowerShell: Check Windows Computers for Specific KB’s

# Check for specific KBs $kbs='KB5010790','KB5010419' $computernames=@('WINDOWS001','WINDOWS002') $regexIP = [regex] "\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b" $names=foreach($computername in $computernames){ if($computername…