Skip to content
LeBlogOSD
Linkedin Github
LeBlogOSD

Table of Contents

Toggle
  • Setting Up Automatic Login in Windows 10 with Windows Master Images
    • With ForceAutoLogon
    • With AutoLogonCount
    • Without AutoLogonCount and Without ForceAutologon
    • AutoLogonCount vs ForceAutoLogon

Setting Up Automatic Login in Windows 10 with Windows Master Images

Setting Up Automatic – In Windows 10, there’s a feature that allows users to automatically log in without entering a password. This is particularly useful in scenarios where a

Useful external reference: Microsoft Learn.

Setting Up Automatic – In Windows 10, there’s a feature that allows users to automatically log in without entering a password. This is particularly useful in scenarios where a machine needs to boot up and run an application without human intervention. Here’s how to enable this feature using PowerShell and the Windows Registry:

Useful external reference: Microsoft Learn.

With ForceAutoLogon

$RegPath = "HKLM:SOFTWAREMicrosoftWindows NTCurrentVersionWinlogon"
$DefaultUsername = "Compte"
$DefaultPassword = "Password"
$DefaultDomain = "Domaine.local"

Set-ItemProperty -Path $RegPath -Name "AutoAdminLogon" -Value "1" -Type String
Set-ItemProperty -Path $RegPath -Name "DefaultUsername" -Value "$DefaultUsername" -Type String
Set-ItemProperty -Path $RegPath -Name "DefaultDomainName" -Value "$DefaultDomain" -Type String
Set-ItemProperty -Path $RegPath -Name "ForceAutoLogon" -Value "1" -Type String
Set-ItemProperty -Path $RegPath -Name "DefaultPassword" -Value "$DefaultPassword" -Type String

With AutoLogonCount

$winlogonPath = "HKLM:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"

# Définir les clés de registre pour l'auto-login sans utiliser de variables
Set-ItemProperty -Path $winlogonPath -Name "AutoAdminLogon" -Value "1" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultUserName" -Value "david" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultDomainName" -Value "monlab" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultPassword" -Value "Password1" -Type String
Set-ItemProperty -Path $winlogonPath -Name "AutoLogonCount" -Value 2147483647 -Type DWord

Without AutoLogonCount and Without ForceAutologon

Setting Up Automatic – This solution is similar to AutoLogonCount but without a limit

Useful external reference: Microsoft Learn.

$winlogonPath = "HKLM:SoftwareMicrosoftWindows NTCurrentVersionWinlogon"

# Définir les clés de registre pour l'auto-login sans utiliser de variables
Set-ItemProperty -Path $winlogonPath -Name "AutoAdminLogon" -Value "1" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultUserName" -Value "david" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultDomainName" -Value "monlab" -Type String
Set-ItemProperty -Path $winlogonPath -Name "DefaultPassword" -Value "Password1" -Type String

AutoLogonCount vs ForceAutoLogon

Setting Up Automatic – The AutoLogonCount and ForceAutoLogon registry keys both play roles in configuring auto-login, but they serve different purposes:

Useful external reference: Microsoft Learn.

Setting Up Automatic – AutoLogonCount: This key specifies the number of times the computer should automatically log in before disabling auto-login. For example, setting AutoLogonCount to 5 allows five automatic logins, after which the feature will be disabled. This is useful when you need only temporary automatic login.

Useful external reference: Microsoft Learn.

Setting Up Automatic – ForceAutoLogon: When set to 1, this key forces the auto-login feature to stay enabled even after a user logs out. Unlike AutoLogonCount, ForceAutoLogon does not limit the number of automatic logins, making it ideal for kiosks or systems that require continuous automatic login.

Useful external reference: Microsoft Learn.

Setting Up Automatic –

Useful external reference: Microsoft Learn.

  • Home
  • Administration
    • Bios & Drivers
    • Master
    • Packaging
    • Tools
    • Security
    • Scripts
    • Infra
  • MDM
    • EPM
    • Intune
    • MDT
    • Quest SMA
    • Quest SDA
    • Desktop Authority
    • Xtraction
    • SCCM
    • Tanium
    • Rundeck
    • WSUS
  • Favoris
  • Contact
Search