Wed. Oct 27th, 2021

Make sure that your Home windows programs are totally accessible and able to roll with assist from a easy PowerShell script.


Picture: iStock/BestForBest

These of us who depend on and administer Home windows programs for work are nicely conscious of the varied advantages and challenges bestowed upon us by Microsoft. For essentially the most half, I am happy with the default Home windows settings, however each from time to time I have to make modifications to my display screen saver, sleep mode and display screen lock settings for optimum effectivity. 

It is easy sufficient to do that should you’re an administrator on the system (corresponding to your private laptop).

SEE: 20 good habits community directors need–and 10 habits to interrupt (free PDF) (TechRepublic)

The best way to regulate Display screen Saver settings

Proper-click Begin, go to Settings, seek for Flip Display screen Saver On Or Off and make the specified modifications (Determine A).

Determine A


The best way to regulate Sleep Mode settings

Proper-click Begin, go to Settings, select System after which Energy & Sleep and make the specified modifications (Determine B).

Determine B


The best way to regulate Display screen Lock settings utilizing this PowerShell script

This useful TechRepublic article explains how one can make a mandatory registry change then tweak this setting. It additionally offers a dependable registry file you’ll be able to import to your laptop to make the change for you.

If you happen to’re utilizing a company-owned system or one you personal that operates beneath a Convey Your Personal Gadget coverage, probably there might be centralized controls utilized to this occasion of Home windows that you could’t management–specifically, automated display screen locking, distant desktop session logoffs or sleep mode energy choices. All of those kick in after a interval of inactivity, and it may be irritating and time consuming to must enter passwords repeatedly, reconnect to misplaced classes or anticipate a system to come back out of sleep mode so you’ll be able to resume your work.

With that in thoughts, this PowerShell script may also help maintain your Home windows logons lively and prepared for work. It merely prompts then deactivates the Scroll Lock button each 4 minutes. This sends a sign to the working system that somebody (technically somefactor) is utilizing the pc and thus your session stays alive.

I need to stress that I do not advocate circumventing safety settings mandated for enterprise operations–not solely would possibly that violate coverage, however it may possibly get employees in bother. Nonetheless, for a work-from-home surroundings, or when connecting to a distant Home windows system through Distant Desktop, this script is usually a secure blessing to assist preserve productiveness. Simply be conscious of the very fact should you run it in your native laptop your Home windows classes might be totally accessible to anybody who accesses the keyboard and mouse, whether or not it is you or not. However you’ll be able to nonetheless lock your display screen utilizing the Home windows-L key mixture after which unlock it along with your password.

SEE: Microsoft PowerShell: Discover ways to automate your workday (TechRepublic Academy)

To make use of the script, copy the code beneath, open up Notepad (right-click Begin, select Run, enter notepad and hit Enter) and paste it into the textual content editor. Save the script as “keepalive” (or no matter title you select) and add the .ps1 extension. Be aware: You need to set the Save As Kind discipline to All Recordsdata, lest Notepad save the script as keepalive.ps1.txt (Determine C).

Determine C


Proper-click the script file and select Run With PowerShell to run it (or copy it to the goal Home windows machine you want to run it on). You will note the Home windows PowerShell display screen (Determine D).

Determine D


The script should stay operating as a way to give you the results you want, however you’ll be able to decrease this window.

SEE: Guidelines: Server stock (TechRepublic Premium)

If in case you have points operating it with the PowerShell executable, attempt PowerShell Built-in Scripting Setting (ISE). Open the Begin Menu, scroll all the way down to Home windows PowerShell, broaden that folder and open Home windows PowerShell ISE. Browse to the script file utilizing File then Open and double-click it after which click on the inexperienced Play icon within the toolbar so it runs (Determine E).

Determine E


Echo "Hold alive w/ scroll lock..."

$WShell = New-Object -com "Wscript.Shell"

whereas ($true)



Begin-Sleep -Milliseconds 100


Begin-Sleep -Seconds 240


Additionally see

Source link

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *