1
0
Files
Repository/AutoAdminLogon/Enable.ps1
2025-10-31 08:58:36 +01:00

11 lines
551 B
PowerShell

$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
$DefaultUsername = "Compte"
$DefaultPassword = "Password"
$DefaultDomaine = "Domaine.local"
Set-ItemProperty $RegPath "AutoAdminLogon" -Value "1" -type String
Set-ItemProperty $RegPath "DefaultUsername" -Value "$DefaultUsername" -type String
Set-ItemProperty $RegPath "DefaultDomainName" -Value "$DefaultDomaine" -type String
Set-ItemProperty $RegPath "ForceAutoLogon" -Value "1" -type String
Set-ItemProperty $RegPath "DefaultPassword" -Value "$DefaultPassword" -type String