today I had to move a Roaming Profile to a new Destination with keeping the existing rights. I know that Roaming Profiles are not the best dessication, but it was here before me 🙂 .
Rights on the source System
So I try to copy the Profile with good old robocopy Command, but the rights was lost with the Option /MIR .
robocopy <Source> <Destination> /MIR
These are the Rights after copy command was executed with the wrong Options
So I searched some more Options and found the common Options, which are much better ;-).
So execute this in an administrative Command Line
robocopy <Source> <Destination> /E /B /COPYALL
Option /E is to copy all Files and Folders even if they are empty.
Option /B is to copy Files in Backup Mode.
Option /COPYALL copies all File information as /copy:DATSOU
T Time stamps
S NTFS access controll list (ACL)
O Owner information
U Auditing information
*Taken from the Microsoft Website
So now everything was correctly copied to the new Destination