How to Enable Autologon for Domain-Joined Windows Servers and Workstations

Tuesday, April 29, 2008

Update: I've confirmed that the following procedures also work for all versions of Windows and Windows Server.

In a previous post I showed how to enable Autologon for workgroup servers and workstations.

Once you join a server to a domain, Windows will automatically delete the AutoAdminLogon value from the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon registry key. This causes the userpasswords2 control to hide the "Users must enter a user name and password to use this computer" check box shown above.

Here's how to get the missing checkbox back and configure AutoLogon:
  • Open an elevated CMD prompt and enter the following (all on one line):
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v AutoAdminLogon /t REG_SZ /d "1" /f
  • Click Start, Run and enter control userpasswords2
  • Clear the checkbox for Users must enter a user name and password to use this computer and click OK
  • Enter the user name and password that will be used for automatic logon and click OK
You may find that you need to configure the default domain, as well.  If so, enter the following (all on one line) at an elevated CMD prompt:
reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" /v DefaultDomainName /t REG_SZ /d %USERDOMAIN% /f
When the computer starts up the account you specified will be logged in automatically.  Note that the password is encrypted on the computer.

This tip works for all versions of Windows desktops and servers.

Since you're here, be sure to check out my article about building a super-fast Windows Hyper-V lab server for under $1,000!