This commit is contained in:
2024-02-02 08:51:12 -06:00
parent 940a5140a1
commit 7eebe15dfa
2 changed files with 2 additions and 5 deletions

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERS='2.5.237-02022024'
VERS='2.5.238-02022024'
noheader=' update service dailytemp confsync -r -report '

View File

@@ -11,10 +11,7 @@ Foreach ($vmhost in $vmhosts)
{
$migrating=Get-Task | ?{$_.ObjectId -match 'VirtualMachine'} | Select @{N='VM';E={(Get-View -Id $_.ObjectId).Name }},State,Description | where {$_.VM -eq $vm -and $_.Description -like '*Relocate*' -and $_.State -eq 'Running'}
if ([string]::IsNullOrEmpty($migrating)) {
write-host "Shutting down "+$vm
#Get-VM $vm | Shutdown-VMGuest -Confirm:$false
} else {
write-host "MIGRATING "+$vm
Get-VM $vm | Shutdown-VMGuest -Confirm:$false
}
}
}