How to lock your Windows 10 PC using Command Prompt

Configurare noua (How To)

Situatie

Solutie

First, open the Command Prompt on your PC by opening the Start menu, typing “cmd” in the Windows Search bar, and then selecting “Command Prompt” from the search results.

Command Prompt will now open. Here, run this command to lock your Windows 10 PC.

Rundll32.exe user32.dll,LockWorkStation

Once executed, your PC will be locked. You’ll have to sign back in with your PIN, password, or whatever sign-in method you usually use.

Set the Lock Screen Timeout Setting Using Command Prompt

Once you’ve locked your PC, the lock screen will generally be displayed for a certain amount of time before it time outs. You can set the amount of time that needs to pass before timing out using the Command Prompt.

To do this, you’ll need to open Command Prompt as an admin. Do so by typing “cmd” in the Windows Search bar and then right-clicking “Command Prompt” from the results. Next, select “Run As Administrator” from the menu that appears.

With Command Prompt open, run this command.

powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK <time>

Replace <time> with your desired amount of time in seconds. That means if you want to time out the lock screen after two minutes, you’d enter this command:

powercfg.exe /SETACVALUEINDEX SCHEME_CURRENT SUB_VIDEO VIDEOCONLOCK 120

Next, run this command:

powercfg.exe /SETACTIVE SCHEME_CURRENT

Tip solutie

Permanent

Voteaza

(3 din 6 persoane apreciaza acest articol)

Despre Autor

Leave A Comment?