

In order to always change the registry value to 1, it’s easier to create a new task in the Task Scheduler that will run at user logon. However, the Windows automatically resets the value of the Enabled parameter to 0 at each user logon.

Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch' -Name Enabled -Value 1 Reg Add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch /v Enabled /t REG_DWORD /d 1 /f You can change this parameter through the RegEdit GUI, Reg Add cli command or Set-ItemProperty PowerShell cmdlet: To display all local users on the Windows login screen, you need to change the value of Enabled parameter to 1 in the following registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\UserSwitch.


To do this go to the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System, create a new DWORD parameter named dontdisplaylastusername with the value 1. By default, this policy is disabled.Īlso, you can hide the username on the login screen through the registry. Enable the policy “ Interactive logon: Do not display last user name”. Open the domain (gpmc.msc) or local ( gpedit.msc) Group Policy editor and go to the section Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options. You can hide the last logged user name on a Windows welcome screen through the GPO. An attacker who gained local access to a computer will have to pick up only a password (for this there are various ways of social engineering, brute force attacks, or a banal sticker with a password on the monitor). How to Hide User Account from Windows Logon Screen?ĭisplaying the account name on the Windows login screen is convenient for users, but reduces the computer security.
