Moving User's Home Directories

So I moved user's home directories to a new server.  Sounds simple enough, right?  The user directories are sitting on the new server needing permission granted to the user.  I thought I would be able to select multiple users in AD, change the home directory path with the %username% wildcard and be on my way.  Wrong!  Errors out saying folder already created.  Doesn't assign permissions.  To make matters worse, I think I've fallen into this trap before.  So I'm stuck doing it one by one waiting for permissions to assign to every file and folder a user has.

For future reference, is there anything I could have done differently?
Who is Participating?
For future reference, you an use Robocopy and copy the files with /copyall or /mir option.
I use a bat file like this to set permissions:

cacls e:\home\ /t /g "domain admins":f
cacls e:\home\ /t /e /g "System":f 
cacls e:\home\ /t /e /g "Creator Owner":f 
For /d %%f IN (*) Do cacls %%f /t /e /g %%f:f

Open in new window

This will reset all permissions for full control for domain admins, then ad system and owner with full as well.
Kram80Author Commented:
With those Robocopy options I'm guessing it copies over permissions too?
Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Yes, The options are:

  /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
  /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
  /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

The /SEC copies security settings, /Copyall makes an identical copy and /MIR will make an exact copy of the original directory, including deleting any files that do not exist from the source directory. Robocopy is a Microsoft program similiar to xcopy, but with lots more options. I use it for all my big copies now.
Couldn't you also, on the new server, rename the folder holding the home directories, then in AD, use your %USERPROFILE% option, after completed, move the home directories to their new home?
You would have to move them to a different drive on the server. From what I recall, If you copy files from the same drive, they will retain the permissions. When you move them to a different drive, the permissions reset to the parent directory. Either way could result in inconsistent or undesired permissions.

Using Robocopy is the safest way to maintain permissions. Using the cacls script I provided is the safest way to reset them.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.