JayRHa / EndpointAnalyticsRemediationScripts

MIT License
396 stars 85 forks source link

Autologon script #87

Open mcfly1923 opened 3 weeks ago

mcfly1923 commented 3 weeks ago

Hi,

I am looking for a remediate script to check for autologon and set it if it not listed. This is the ps I have for it.

PowerShell script to enable autologon on an Intune managed devices

Define the username and password for autologon

$username = test $password = test123

Set the registry keys for autologon

$regKey = "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon" Set-ItemProperty -Path $regKey -Name "AutoAdminLogon" -Value 1 Set-ItemProperty -Path $regKey -Name "DefaultUserName" -Value $username Set-ItemProperty -Path $regKey -Name "DefaultPassword" -Value $password

Restart the computer to apply the changes

Restart-Computer -Force