⚡ PowerShell 5.1+
Disable Lock Screen
Skips straight to the sign-in screen instead of showing the lock screen (requires admin). Requires an elevated (Administrator) prompt.
Set-DisableLockScreen.ps1
<#
.SYNOPSIS
Disable Lock Screen.
.DESCRIPTION
Skips straight to the sign-in screen instead of showing the lock screen (requires admin). Requires an elevated (Administrator) prompt.
Sets HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization \ NoLockScreen to 1.
.EXAMPLE
.\Set-DisableLockScreen.ps1
#>
[CmdletBinding()]
param()
$regPath = 'HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization'
if (-not (Test-Path $regPath)) {
New-Item -Path $regPath -Force | Out-Null
}
New-ItemProperty -Path $regPath -Name 'NoLockScreen' -Value 1 -PropertyType DWord -Force | Out-Null
Write-Host "Disable Lock Screen applied. Sign out and back in (or restart explorer.exe) for it to fully take effect." -ForegroundColor Green