Windows: Migrate Domain User Profile To Local

If you are leaving a company and keep your corporate laptop, that is in a company’s AD domain (e.g. AzureAD), with you, you may wonder how to keep your user’s profile settings and data before removing it from the domain.

Unfortunately, by the moment, Microsoft doesn’t propose any official tool to migrate the domain user profile to the local one (at least i couldn’t find one).

Nevertheless, there is a tool called “User Profile Wizard”, created by ForensiT’s, that can be used to copy the domain user profile to the local one and in this article I will show you how to do this.

Cool Tip: How to determine whether the current user is a Domain User account or a Local User account! Read more →

Copy Domain Profile to Local Profile

  1. Create a local user account:

    Press ⊞ Win keybutton to open the start menu, type in cmd to search for the command prompt and press Ctrl + Shift + Enter to start CMD as administrator.

    In the elevated command prompt, execute the following commands to create the local user account, set the password and add it to the local “Administrators” group:

    C:\> net user <local_user_name> /add
    C:\> net user <local_user_name> <password> /add
    C:\> net localgroup Administrators <local_user_name> /add
  2. Download, install and launch the “User Profile Wizard”.
  3. Select the domain user account and click the “Next”.
  4. Select the local computer name from the drop-down, check the “Join Workgroup” box, enter the username of the local profile created above, click the “Next” and wait for the migration to complete.
  5. Once the domain user profile is copied to the local one, you will be able to click the “Next” and the computer will reboot.
  6. After reboot, the default login will be the new local user account that you have created.

Note that after migration of the domain user profile to the local one, the path to the user profile folder will remain the same, i.e. C:\Users\<DomainUserName>.

Cool Tip: Check if the computer is in a domain! Read more →

If your local user name is different from the domain one, you may want to rename the user profile folder. for this:

  1. Log in by using another administrative account.
  2. Rename the C:\Users\<DomainUserName> to the new user name.
  3. Open the registry editor (press ⊞ Win + R and execute regedit), go to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\<UserSID> and change the value of the ProfileImagePath to the new path name (to find out the <UserSID>, execute the wmic useraccount get name,sid).

Cool Tip: How to find a user’s SID (security identifier) in Windows! Read more →

Leave a Reply