w10install/tools/setup-autologon.ps1

14 lines
492 B
PowerShell
Raw Permalink Normal View History

2023-02-01 21:35:19 +01:00
# Activate Auto-Logon
2023-01-31 21:00:57 +01:00
$Username = Read-Host 'USER ? '
$Password = Read-Host 'PASSWORD ? '
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
2023-02-01 21:35:19 +01:00
Set-ItemProperty $RegistryPath 'AutoAdminLogon' -Value "1" -Type String
Set-ItemProperty $RegistryPath 'DefaultUsername' -Value "$Username" -type String
2023-01-31 21:00:57 +01:00
Set-ItemProperty $RegistryPath 'DefaultPassword' -Value "$Password" -type String
Write-Warning "AUTO LOGON for user [ $Username ] configured!"
Write-Host