Prevent screen lock on a restricted (company) computer

Prevent screen lock on a restricted (company) computer

I've written a PowerShell command that presses the ScrollLock key every 240 seconds, which otherwise has no effect on the computer, but prevents the screen from locking.
This command works on all Windows-based computers with restricted access.

This method also works on machines where you do not have administrator rights, cannot install programs, or cannot run portable programs.

It's simple to use. Type "PowerShell" in the Start menu, launch it, then copy and paste the following command (one line), and press Enter.

while(1){(New-Object -Com "Wscript.Shell").SendKeys("{SCROLLLOCK}");sleep 240}

This is what it will look like:


That's all. Be careful not to close the window.

 

If you found this article useful and would like to show your appreciation, please consider making a small donation via PayPal. Your support will allow me to continue creating valuable content and make my blog even better. Thank you for your contribution!

Feriman

Feriman

I am passionate about helping individuals and businesses achieve greater efficiency and productivity through automation, optimization and utilizing technologies like Linux and Raspberry Pi. I believe that by streamlining processes and earning passive income, we can achieve financial freedom and live a better life. My goal is to share my knowledge and experience with you, and help you improve your workflows and increase your earning potential.

Related posts

How to (re)install the Active Directory Users and Computers (ADUC) after Windows Update

How to (re)install the Active Directory Users and Computers (ADUC) after Windows Update

Comments