Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. function stay-alive {
  2. Write-Output 'Staying Awake...'
  3. $minutes = 60
  4. $myshell = New-Object -com "Wscript.Shell"
  5.  
  6. for ($i = 0; $i -lt $minutes; $i++) {
  7. Write-Output 'Sending 1 beam of energy'
  8. Start-Sleep -Seconds 60
  9. $myshell.sendkeys(".")
  10. }
  11.  
  12. Write-Output 'End of Sleep'
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement