Del via


AutoLogon

AutoLogon specifies the account to use to log on to a computer automatically. AutoLogon credentials are deleted from the unattended installation answer file after Windows Setup is complete.

Important

In Windows 10, if you configure AutoLogon, the OS will skip the user account creation phase during OOBE. This is a change from previous versions of Windows. In addition, the account creation phase during OOBE is skipped in all versions of Windows when at least one user account is created through the UserAccounts section of the same unattend file. This change only applies when no user account is created by unattend such as when setting AutoLogon for a built-in or existing account like Administrator or Guest. In these scenarios, Microsoft recommends using unattend to create at least one user account in the Administrators group to ensure that the device can be managed after the autologon is complete. Make sure AutoLogon is disabled on computers that are delivered to customers.

Note

It is not necessary to explicitly enable the built-in Administrator account or specify an autologon of the account using an answer file in order to run commands in the auditSystem and auditUser passes. Doing so can prevent the image or device from entering the Out-Of-Box Experience (OOBE) successfully. When booting into Audit Mode, the built-in Administrator account is automatically enabled, is used to run scripts during auditUser pass by default, and is used to sign in automatically.

For more information about the built-in administrator account, see the How to Enable and Disable the Built-in Administrator Account topic in the Windows Assessment and Deployment Kit (Windows ADK) Technical Reference.

Note

These settings are valid for upgrades.

Child Elements

Setting Description
Domain Specifies the domain to which the computer is logging on.
Enabled Specifies whether the automatic logon process is enabled.
LogonCount Specifies the number of times that the account has been used. LogonCount must be specified if AutoLogon is used.
Password Specifies the password for the account that is used for automatic logon.
Username Specifies the user account name that is used for automatic logon.

Valid Configuration Passes

auditSystem

oobeSystem

specialize

Parent Hierarchy

Microsoft-Windows-Shell-Setup | AutoLogon

Applies To

For a list of the Windows editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup. This setting is not configured in a Nano Server image.

XML Example

The following XML output shows how to set automatic logon.

<AutoLogon>
   <Password>
      <Value>MyPassword</Value>
   </Password>
   <Domain>FabrikamDomain</Domain>
   <Enabled>true</Enabled>
   <LogonCount>2</LogonCount>
   <Username>MyUserName</Username>
</AutoLogon>

Microsoft-Windows-Shell-Setup