# Activate Auto-Logon

$Username = Read-Host 'USER ? '
$Password = Read-Host 'PASSWORD ? '
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'

Set-ItemProperty $RegistryPath 'AutoAdminLogon' -Value "1" -Type String
Set-ItemProperty $RegistryPath 'DefaultUsername' -Value "$Username" -type String
Set-ItemProperty $RegistryPath 'DefaultPassword' -Value "$Password" -type String

Write-Warning "AUTO LOGON for user [ $Username ] configured!"
Write-Host

