LogonCount

Applies To: Windows 7, Windows 8, Windows 8.1, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Vista

LogonCount specifies the number of times that you can log on to the computer by using AutoLogon. This value decrements each time you log on to the computer. You must restart the computer to reset the value of LogonCount. LogonCount must be specified if AutoLogon is used.

After the specified number of automated logon actions has occurred, you must manually log onto the computer.

If the built-in administrator account is used, the account is still active. 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.

Values

Logon_count

Specifies the number of times you can log on to the computer by using AutoLogon. Logon_count is an integer.

Valid Configuration Passes

auditSystem

oobeSystem

specialize

Parent Hierarchy

Microsoft-Windows-Shell-Setup | AutoLogon | LogonCount

Applies To

For a list of the Windows® editions and architectures that this component supports, see Microsoft-Windows-Shell-Setup.

XML Example

The following XML output shows how to set AutoLogon so that you can log onto the computer twice using the built-in administrator account.

<AutoLogon>
   <Password>
      <Value>MyPassword</Value>
      <PlainText>true</PlainText>
   </Password>
   <Enabled>true</Enabled>
   <LogonCount>2</LogonCount>
   <Username>Administrator</Username>
</AutoLogon>

See Also

Concepts

AutoLogon