Interactive logon: Display user information when the session is locked: registry value DontDisplayLockedUserIdComputerHKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System

Category
Security Settings › Local Policies › Security Options
Scope
Computer Configuration
Source
Windows 11 (version 26H2 · 26300.9457)

Registry

DontDisplayLockedUserId

REG_DWORDComputer
Enabled value
Depends on the option value
Element
Interactive logon: Display user information when the session is locked
Options
ItemStored value
User display name, domain and user names1
User display name only2
Do not display user information3
Domain and user names only4
Apply with .reg · CMD · PowerShell
.reg
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System]

; Options (use only one)
; User display name, domain and user names
"DontDisplayLockedUserId"=dword:00000001
; User display name only
"DontDisplayLockedUserId"=dword:00000002
; Do not display user information
"DontDisplayLockedUserId"=dword:00000003
; Domain and user names only
"DontDisplayLockedUserId"=dword:00000004
CMD
:: Options (use only one)

:: User display name, domain and user names
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DontDisplayLockedUserId" /t REG_DWORD /d 1 /f
:: User display name only
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DontDisplayLockedUserId" /t REG_DWORD /d 2 /f
:: Do not display user information
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DontDisplayLockedUserId" /t REG_DWORD /d 3 /f
:: Domain and user names only
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DontDisplayLockedUserId" /t REG_DWORD /d 4 /f
PowerShell
# Common: create the key
New-Item -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Force | Out-Null

# Options (use only one)
# User display name, domain and user names
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'DontDisplayLockedUserId' -PropertyType DWord -Value 1 -Force | Out-Null
# User display name only
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'DontDisplayLockedUserId' -PropertyType DWord -Value 2 -Force | Out-Null
# Do not display user information
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'DontDisplayLockedUserId' -PropertyType DWord -Value 3 -Force | Out-Null
# Domain and user names only
New-ItemProperty -Path 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Policies\System' -Name 'DontDisplayLockedUserId' -PropertyType DWord -Value 4 -Force | Out-Null