Windows – Copying Data from Cached Redirected Folders (User Profile)

email me

Here’s an issue I ran into: When migrating a user from domain to Azure, the user has a redirected profile. The user’s data—from their domain profile—was successfully copied to their Azure profile (I scripted robocopy to do the work), but…upon further investigation, the user was missing Documents and Desktop. What? How? This one user had a Redirected User Profile (using a cached copy of Documents and Desktop).

Where does Microsoft store domain redirected user profiles? In the protected location:

C:\Windows\CSC\v2.0.6\namespace

 

Now, you could take ownership of each folder in that path and grant the appropriate permissions (which takes forever if the user has a large profile), or a much faster solution, just open the path as SYSTEM ACCOUNT, and use xcopy or robocopy to copy the data to the new location.

How do you open a path as SYSTEM ACCOUNT? Use psexec.

 

Steps


#1
From an admin prompt, psexec -i -s cmd.exe (opens a command prompt as SYSTEM ACCOUNT)
— run whoami to verify current user


#2
CD C:\Windows\CSC\v2.0.6\namespace (change directory to where protected redirected profiles are stored)


* navigate to specific user’s profile in the File Server folder


#3
Use xcopy to copy user data to new profile

xcopy /s /e /h /c “*.*” “C:\Users\NewUserProfile”

 


Notes

xcopy

whoami

robocopy

Types of local accounts