How to require manual entry of username at login?

10,937

Open an elevated Powershell and run:

New-ItemProperty -Path "HKLM:\SOFTWARE\MICROSOFT\Windows\CurrentVersion\Policies\System\" -Name "DontDisplayLastUserName" -PropertyType DWord -Value 1 -Force

to switch back to the original behavior delete that key or set the value to 0

New-ItemProperty -Path "HKLM:\SOFTWARE\MICROSOFT\Windows\CurrentVersion\Policies\System\" -Name "DontDisplayLastUserName" -PropertyType DWord -Value 0 -Force

this is the same as in previous versions of Windows.

Share:
10,937

Related videos on Youtube

Eric
Author by

Eric

Updated on September 18, 2022

Comments

  • Eric
    Eric over 1 year

    How can I require that the user has to know which username they want and manually have to type in the username they want to sign in to, instead of the lock screen where they can just choose a username?

  • Eric
    Eric almost 9 years
    Hey, sorry I'm bad at this. Do you know what would be wrong if I paste that in and get this response? New-ItemProperty : Cannot find path 'C:\WINDOWS\HKLM\SOFTWARE\MICROSOFT\Windows\CurrentVersion\P‌​olicies\System\' because it does not exist. At line:1 char:1 + New-ItemProperty -Path "HKLM\SOFTWARE\MICROSOFT\Windows\CurrentVersio ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~‌​~~~~~~~~~ + CategoryInfo : ObjectNotFound: (C:\WINDOWS\HKLM...olicies\System\:String) [New-ItemProperty], ItemNotFo undException + FullyQualifiedErrorId : PathNotFound,Microsoft.....
  • Peter Hahndorf
    Peter Hahndorf almost 9 years
    Sorry, my mistake, I missed the colon after the HKLM, please try again.
  • Eric
    Eric almost 9 years
    No problem, I appreciate your help. Is this a registry value I'm changing? I get a new message that occurs when I run either of the commands above: New-ItemProperty : The property already exists. At line:1 char:1 + New-ItemProperty -Path "HKLM:\SOFTWARE\MICROSOFT\Windows\CurrentVersi ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~‌​~~~~~~~~~ + CategoryInfo : ResourceExists: (HKEY_LOCAL_MACH...olicies\System\:String) [New-ItemProperty], IOExcepti on + FullyQualifiedErrorId : System.IO.IOException,Microsoft.PowerShell.Commands.NewItemP‌​ropertyCommand
  • Peter Hahndorf
    Peter Hahndorf almost 9 years
    @Eric - I should really have tested this more before posting it. If they value already exists (which is possible) it needs the -Force switch. I added that, please try again.