Przejdź do treści

Powershell – Ustawianie Automatycznego Logowania do Komputera

## Run always as admin

Write-Host "Setting autologin - Start"

$Login = "TEST" // User Login 
$Password_clear ="TEST"  // User Password
$Password = ConvertTo-SecureString  $Password_clear -AsPlainText -Force

# Ustaw automatyczne logowanie
$RegPath = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon"
Set-ItemProperty -Path $RegPath "AutoAdminLogon" -Value "1" -type String 
Set-ItemProperty -Path $RegPath "DefaultUsername" -Value $Login -type String 
Set-ItemProperty -Path $RegPath "DefaultPassword" -Value $Password_clear -type String

Write-Host "Setting autologin - end "

Dodaj komentarz

Twój adres email nie zostanie opublikowany. Wymagane pola są oznaczone *