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
- Create a local user account:
Press ⊞ Win keybutton to open the start menu, type in
cmdto search for the command prompt and press Ctrl + Shift + Enter to start
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
- Download, install and launch the “User Profile Wizard”.
- Select the domain user account and click the “Next”.
- 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.
- Once the domain user profile is copied to the local one, you will be able to click the “Next” and the computer will reboot.
- 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.
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:
- Log in by using another administrative account.
- Rename the
C:\Users\<DomainUserName>to the new user name.
- 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
ProfileImagePathto 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 →