I have spent a lot of time just trying to determine if what I am trying to do is possible. I’m hoping if I explain in detail someone can at least answer that question. If they will further assist with some links or even some scripting suggestions that would be a bonus.

I would like to create a script that is launched at login. It will get the current logged in user and search against a CSV that has 2 columns, one for the old domain username and one for the new domain username. If it finds that the new username is the one that is searched it will then call to another function that starts a migration of that user’s files and app settings from their old domain user account to the new. I’am very confident I can write this first function that will be kicked off and search the CSV and then pass the $oldUser and $newUser to the 2nd function (I will also put in a check to ensure this only happens once).

The second part is where I am struggling. I was thinking I could use USMT if I had the USMT files I need on a network share. Then basically I would choose the correct arguments to migrate the user files and settings from the old domain account to the new domain account. I have tried to just do a live migration on my system with a test account but no matter what I’ve tried either nothing happens or I get various errors.

These are Windows 7 workstations and the accounts will both be on the same computer. Not migrating to new computers. We will be doing a domain migration for the workstations and once that is complete the users will log in with their new domain account. Is it possible to use USMT and Powershell to migrate users files and settings like this?

This maybe of some help

Unfortunately I cannot use Invoke-Command. That is why I was going to kick the script off with a task and store the files on a file share.