Use Group Policy to enable Auto-Login feature

Windows Server

This tutorial will guide you through the process of creating auto-login feature using Group Policy Preference on Windows Server 2012 R2 domain.

Open Group Policy Management

Create and link a new GPO on the desired folder in Group Policy Management.

Click to Edit Policy and navigate to:

Computer Configuration | Preferences | Registry

In the right pane click to create new Registry Item and enter the following values:

Action: Update

Hive: HKEY_LOCAL_MACHINE

Key Path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Value name: AutoAdminLogon

Value type: REG_SZ

Value data: 1

Note that you will only need to enter information in Key Path windows, Value name and Value data.

Repeat above steps to create additional 3 registry key settings:

Action: Update

Hive: HKEY_LOCAL_MACHINE

Key Path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Value name: DefaultDomainName

Value type: REG_SZ

Value data: %Yourdomainname%

 

Action: Update

Hive: HKEY_LOCAL_MACHINE

Key Path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Value name: DefaultPassword

Value type: REG_SZ

Value data: %user password%

 

Action: Update

Hive: HKEY_LOCAL_MACHINE

Key Path: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Value name: DefaultUserName

Value type: REG_SZ

Value data: %username%


You should have the same settings as in the picture:

Now all we have to do is run GPUPDATE /FORCE on the target machine and restart it.

Specified user should be now automatically logged in.

You may also like...

3 Responses

  1. DRELLO says:

    I’d like to add…

    If one of the registry key settings are not present to be set (i.e. the username), you first need to select to “CREATE” the registry key setting, then continue on with the creating the “UPDATE” registry key setting.

    The error you receive if this isn’t set up should be indicative enough of where you need to look to go to fix.

    DRELLO

    • DRELLO says:

      I should have stated that the registry key may not be present due to the level of your OS. I had been working in a 2008 Environment at the time.

  2. Nikolinjo says:

    Hi Drello,
    yes, you’re absolutely right. I have not tested this policy in other environments.

    Regards,
    Nik

Leave a Reply

Your email address will not be published. Required fields are marked *

four × 4 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.