Create new user folder on new server and move data

Hello,

I am new to Powershell and wondering if I can get some help on this task.

Is there something available to create user folders on a new server and move the data from older server to the new one, allow me to enter the parameters to run for and rename the older folders?

For example, for user last name starting from A to H, it will create the folder on server01 and move data for those accounts to server01. Next for last name from I to P, folders and data will be on server02, etc.

How do I make it to allow me to run 1 account or a range at a time? I don’t want to run all 5000 accounts at 1 time.

And how do I go about to rename the moved folder to something like xxxx-old so users will not access them.

Any help is appreciated.

thank you

Hi, welcome to the forum :wave:

You could do this with PowerShell but everyone will tell you to use Robocopy instead. As well as ensuring important stuff like permissions and timestamps are copied, it has numerous options to ensure a successful copy. You can even select which hours to run it.

Honestly, if it was me I would be copying all the data in one go, and then just doing a final sync for users or groups of users as you want to migrate them to capture any changes since the copy. Overall, that’s probably quicker.

Regarding renaming the folder, I probably wouldn’t bother. Just change the permissions so only admins can access it, or disable the share.

1 Like

Hi Matt

Thank you for your reply.

I have 2 follow up questions:

  • with Robocopy, do you know if it is possible to run it in a range , for example , A thru C, D thru F, etc.
  • after copying the data using robocopy, is there a tool to change the user Profile in “Active Directory Users and Computers” ? It is too consuming to modify 1 user at a time to change their Home Folder from server to server01, server02, etc. depending on user last name.

Thanks again.

Well it includes everything by default, but you can exclude paths and use wildcards.

Use the Set-ADUser cmdlet with the -HomeDirectory parameter.

No offence but this all sounds a bit rushed. Planning a fileserver migration, especially one for 5000 users takes time. Make sure you plan this properly, test your migration steps and have a backout plan.

Robocopy takes time to learn. I don’t know anyone, myself included, who hasn’t misunderstood the options at some point and been incredibly impressed at just how quickly it can make files disappear.

1 Like

Hi Matt,

Got it.

I will certainly test it thoroughly before running it on live users.

thanks again

1 Like