Update 2025-10: MS is closing loopholes
The following method should* be bulletproof…
At the login prompt, press Shift+F10 to open a command prompt.
net user "username" * /add net localgroup administrators "username" /add net user "username" /active:yes net user "username" /expires:never net user "Administrator" /active:no net user "defaultUser0" /delete net user regedit
Now, in registry editor, navigate to:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\OOBE
and delete the following values:
DefaultAccountAction, DefaultAccountSAMName, DefaultAccountSID
Rename LaunchUserOOBE to SkipMachineOOBE and ensure the value is set to 1
Back at the command prompt, run:
shutdown /r /t 0
Old methods (may not work):
At the “Let’s connect you to a network” screen, press Shift+F10 to open a command prompt and type start ms-cxh:localonly to open a window where you can create a local user.
After filling in the information and clicking the Next button, the Windows 11 setup will continue. However, now it will continue using your created local account and will not prompt you to use a Microsoft Account.