I want to produce a script that can migrate users home directories from one file server - to another.
In the process there should be a check for open files, and after succesful migration NTFS rights should be assigned, and attributes in AD should be changed.
Users home directories are located in D:\Home\ and the folders names = %username%.
I would like the script to read users from a file, and output events to a logfile.
In sequence - this is what I have in mind (Batch script for simplicity):
1. Check if folder contains open files, if yes then log the user and go to the next user
2. Robocopy files (synchronizes changes), log event
3. Set correct NTFS rights on folder (users:N %username%:M domain admins:F)
3. Update Active Directory (dsmod user %username% -home H: \\NewServer\Home\%username
%), log event
4. Add membership for user (add group Home_Migrated, log event
I am going to migrate 25 000 users home directories, so perfomance is an issue - should I run the job on the old server or the new server?
Any other thoughts I may have missed?
Start Free Trial