Get-ItemProperty -Path $regPath | Select AutoAdminLogon, DefaultUserName
Set-ItemProperty -Path $regPath -Name "AutoLogonCount" -Value 3 -Type DWord After 3 successful logons, AutoAdminLogon reverts to 0 . Set-ItemProperty -Path $regPath -Name "AutoAdminLogon" -Value "0" โ Verification Check current status: registry autoadminlogon
Overview This feature configures Windows to automatically log on a specified user (typically an administrator) without manual password entry at the login screen. It uses the Winlogon registry keys. ๐ Registry Path HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon โ๏ธ Required Registry Values | Value Name | Type | Description | |------------|------|-------------| | AutoAdminLogon | REG_SZ | 1 = enable, 0 = disable | | DefaultUserName | REG_SZ | Admin username (e.g., Administrator ) | | DefaultPassword | REG_SZ | Admin user password | | DefaultDomainName | REG_SZ | (Optional) Domain name or . for local | | AutoLogonCount | REG_DWORD | (Optional) Limit number of auto logons | ๐งช Example PowerShell Script to Enable # Enable Registry AutoAdminLogon $regPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" Set-ItemProperty -Path $regPath -Name "AutoAdminLogon" -Value "1" -Type String Set-ItemProperty -Path $regPath -Name "DefaultUserName" -Value "Administrator" -Type String Set-ItemProperty -Path $regPath -Name "DefaultPassword" -Value "YourStrongPassword" -Type String Set-ItemProperty -Path $regPath -Name "DefaultDomainName" -Value "." -Type String Get-ItemProperty -Path $regPath | Select AutoAdminLogon