Last active
June 14, 2019 15:16
-
-
Save lhns/653a44c68c9835855d2d2b8ecfc2ba0c to your computer and use it in GitHub Desktop.
Disable Windows 10 lock screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Requires -RunAsAdministrator | |
| param ([bool]$value = $true) | |
| New-Item -Force -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Personalization" | |
| New-ItemProperty -Force -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Personalization" -Name "NoLockScreen" -PropertyType DWord -Value (&{If ($value) {1} Else {0}}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment