I’ve recently set up or reset multiple PCs. Some of them were personal machines and others were work-issued machines. When resetting a work-issued machine while at the office, I found a specific series of steps that accomplished the end state I desired.
- The desired machine name
- Domain joined (not Azure AD joined)
- User folder matching domain username
It took a couple attempts to get the steps just right, so I captured them for future reference.
Start the Windows 11 Install
- Connect the machine to the corporate network
- Boot to USB with the Windows 11 setup
- When prompted, give the machine the name you want
When clicking Next at this point, the machine will abruptly restart.
Set up for Work or School
- Choose that you want to set the machine up for Work or School
- When asked to sign in, click “Sign-in Options” and select “Domain Join”
This will leave the machine in standalone, local sign-in mode. You can domain join later, but you won’t be prompted to join a domain at this point.
Create a Temporary Local Administrator Account
- When promoted for a username, put in something temporary. DO NOT use your domain username as the name will conflict with the desired user folder once you join the domain.
This account will be a local administrator, which I always delete. When deletion is planned, the password can be left blank.
Finish the Installation
- Choose the permitted telemetry and finish the installation steps
Once installation finishes, you’ll be logged in with the local administrator account.
Join the Domain
- Go to Settings > System > About
- Click on Domain or Workgroup
- Join the domain using your domain credentials
- Restart
Make the Domain User Account an Administrator
- Sign in with the local administrator account
- Go to Control Panel > User Accounts > User Accounts
- Click Manage User Accounts
- Click Add…
- Enter the username and domain
- Choose Administrator and add the account
No credentials will be required at this step. And note that the Windows 11 Settings > Accounts > Other Users screens do not allow you to add a domain account (at the time of this publication).
Sign in with Domain Account
- Sign out from the local administrator account
- Choose to sign in as another user
- Enter your domain credentials and sign in
Remove the Temporary Local Administrator Account
- Go to Control Panel > User Accounts > User Accounts
- Click Manage User Accounts
- Select the temporary local administrator account and click Remove
- Close the windows
Remove the Temporary Account User Folder
- Open
C:\Users
- Delete the temporary user’s folder (confirming administrator privileges to do so)
Enjoy the Sweet Bliss of a Clean Install
At this point, the machine name matches what you want, the machine is properly domain joined (as opposed to being Azure AD joined), and your user folder matches your domain username.