Community Area

Copying User Profiles

by
Mitch Tulloch
[Published on 14 April 2009 / Last Updated on 3 Dec. 2008]

How to copy user profile folders in Vista and later.

In pre-Vista versions of Windows, you could use the xcopy command to copy all user profile folders and their contents to another location, for example when you want to back up or clone the contents of a user's profile. This won't work in Vista or later however because xcopy doesn't handle directory junctions points properly. These directory junction points automatically redirects attempts to access legacy profile paths to their new profile locations. For instance, if you type dir /AL at a command prompt whose current directory is the root of C: drive, you'll see that there is a directory junction point named Documents and Settings present that redirects to the new location C:\Users where user profiles are now stored in Vista and later.

So what can you do if you need to copy user profile folders and their contents in Vista? Use the robocopy command instead, where you can include the /XJD switch that causes directory junction points to be ignored during the copy process.

See Also

The Author — Mitch Tulloch

Mitch Tulloch is a well-known expert on Windows Server administration and cloud computing technologies. He has published over a thousand articles on information technology topics and has written, contributed to or been series editor for over 50 books.

In Part 5 of this article series, we explained why it is important to provide a description text for each GPO. It is important to provide a descriptive text for each GPO if you have hundreds of GPOs and there are multiple IT Teams handling specific GPOs. The PowerShell script could help you get a list of GPOs, which do not have a description text set and then you can modify the description text for important GPOs... Read More