Lock your machine from the command prompt

User submitted tip: Lock your machine from the command prompt

Load your command prompt and type the following command:

  • rundll32.exe user32.dll,LockWorkStation

You could also use the above command as a shortcut on you desktop. Or if you have a multimedia keyboard on which you can customize the command on one of its smart keys, just put in that command and label it Lock Workstation. You'll be able to lock your machine by just hitting ONE key.


This was first published in June 2001

Dig deeper on Windows PowerShell Scripting

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close