Shell/Bash: powershell script to disable screensaver Example

By

Shell/Bash Example: This is the "powershell script to disable screensaver" Example. compiled from many sources on the internet by SimpleTutorials.org

powershell script to disable screensaver

#The below script will trigger dot key every 60 secs

param($minutes = 60) #//Duration. Until 60 mins below script will run

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

for ($i = 0; $i -lt $minutes; $i++) {
  Start-Sleep -Seconds 60 #//every 60 secs dot key press
  $myshell.sendkeys(".")
}



* Summary: This "powershell script to disable screensaver" Shell/Bash Example is compiled from the internet. If you have any questions, please leave a comment. Thank you!

Others