On Windows 10, the auto-login feature is notoriously dangerous for general use. However, it can be useful in some specific and restricted environments, for instance a single-user virtual machine running on a desktop system.
Auto-login is normally enabled using the Windows Settings or the Control Panel. This option is available only when Windows is activated. On single-user virtual machines, Windows is not always activated and it is not possible to access this option.
To directly enable auto-login, even on an unactivated Windows system, open a PowerShell window as administrator and run the following commands:
$RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon'
Set-ItemProperty $RegistryPath 'AutoAdminLogon' -Value "1" -Type String
Set-ItemProperty $RegistryPath 'DefaultUsername' -Value "(username)" -type String
Set-ItemProperty $RegistryPath 'DefaultPassword' -Value "(password)" -type String
Of course, be sure to replace (username)
and (password)
with the actual user name and password.