Skip to content

Instantly share code, notes, and snippets.

@bobfrankly
Created September 20, 2016 21:36
Show Gist options
  • Save bobfrankly/5762dc6186103dadef55d1d420177245 to your computer and use it in GitHub Desktop.
Save bobfrankly/5762dc6186103dadef55d1d420177245 to your computer and use it in GitHub Desktop.
$minutes = Get-Random -Minimum 0 -Maximum 59
$minutes
$restartTime = Get-Date 1:$minutes #adjust hour here
while ((get-date) -lt $restartTime){ Start-Sleep -s 60}
write-host Beginning Restart
#Restart-Computer -Force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment