Skip to content

Autologon script #87

@mcfly1923

Description

@mcfly1923

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions