Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function stay-alive {
- Write-Output 'Staying Awake...'
- $minutes = 60
- $myshell = New-Object -com "Wscript.Shell"
- for ($i = 0; $i -lt $minutes; $i++) {
- Write-Output 'Sending 1 beam of energy'
- Start-Sleep -Seconds 60
- $myshell.sendkeys(".")
- }
- Write-Output 'End of Sleep'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement