7 lines
533 B
PowerShell
7 lines
533 B
PowerShell
Import-Module GroupPolicy
|
|
$gpo = 'CSC - Caregiver Device Lockdown'
|
|
# Hide last logged-on username on the lock/login screen
|
|
Set-GPRegistryValue -Name $gpo -Key 'HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System' -ValueName 'DontDisplayLastUserName' -Type DWord -Value 1 | Out-Null
|
|
Set-GPRegistryValue -Name $gpo -Key 'HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System' -ValueName 'dontdisplaylockeduser' -Type DWord -Value 3 | Out-Null
|
|
Write-Output "Added DontDisplayLastUserName=1, dontdisplaylockeduser=3"
|