Prevent Screensavers and Lock-screens with Powershell
There might be a number of reasons to want to prevent your windows screensavers and lock-screens from engaging and in some cases (no doubt yours if you have hit this article from a search engine) local policy on the machine preventing you from changing these settings. Powershell lets us work around this problem and prevent the machine from locking or activating a screensaver. Prevent Screensavers and Lock-screens The bulk of the code below has been lifted from this great write up: https://dmitrysotnikov.wordpress.com/2009/06/29/prevent-desktop-lock-or-screensaver-with-powershell/ I just took things one step further by adding an infinite loop. My version of this code will run indefinitely. ...