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 last published in June 2001

Dig Deeper on Windows PowerShell Scripting

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchServerVirtualization

SearchCloudComputing

SearchExchange

SearchSQLServer

SearchWinIT

SearchEnterpriseDesktop

SearchVirtualDesktop

Close