There are 2 steps to the Profile Migration scripts. 



Step 1: Joins the domain, schedules step 2 and restart the endpoint. The prompt version will ask for the user account to migrate from, the new domain name, domain admin and password. The version without prompt, will only prompt for the user account to migrate from, but needs to be edited (Lines 5, 6 and 7) or copied to include the domain name, domain admin and password inside the script. This is more convenient if it needs to be ran multiple times without having to input the same information multiple times. Step 2 will be scheduled to run 5 minutes after step 1 to give time for the reboot to perform.


Step 2: Looks at the logged in user, if no user is logged in, or if Helix, HelixAdmin, RecoveryAdmin or RemoteAdmin are logged in, it will rescheduled itself 10 minutes later. This will keep rescheduling until another user is logged in. Once a domain user is logged in, it will start transferring all content from Documents, Favorites, Pictures, Videos, Desktop, Music, as well as Folders for Chrome and Firefox (C:\Users\#user#\AppData\Local\Google\Chrome\User Data and C:\Users\#user#\AppData\Local\Mozilla\Firefox.) Once the transfer is over it will email the admin who ran the script and delete all files and scripts used.