Przejdź do treści

Powershell – Skrypt automatyczne logowanie do komputera Windows

Write-Host "Start autoconfiguration by chris"

# Login konta
$Login = "test_konto"
# Haslo Konta
$Password = ConvertTo-SecureString  "abc" -AsPlainText -Force

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

Dodaj komentarz

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