Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Write-Host "Rebooting $ServerName"
- Restart-VMHost $CurrentServer -confirm:$false | Out-Null
- # Wait for Server to show as down
- do {
- sleep 15
- $ServerState = (get-vmhost $ServerName).ConnectionState
- Write-Host "$ServerName is Down"
- } until ($ServerState -eq "Maintenance")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement