Last active
August 29, 2015 14:10
-
-
Save edingc/c8863e48a6278c60b396 to your computer and use it in GitHub Desktop.
Shutdown computers one at a time and don't continue until confirmed down
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get-Content ComputersToShutdownInOrder.txt | Foreach-Object { Stop-Computer $PSItem -Force; Do { Write-Host "$PSItem still pinging!"; Start-Sleep -s 1 } Until ( ( Test-Connection -Count 1 -Quiet $PSItem ) -eq $False ); Write-Host "$PSItem is down!" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment