update
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
VERS='2.5.237-02022024'
|
VERS='2.5.238-02022024'
|
||||||
|
|
||||||
noheader=' update service dailytemp confsync -r -report '
|
noheader=' update service dailytemp confsync -r -report '
|
||||||
|
|
||||||
|
|||||||
@@ -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'}
|
$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)) {
|
if ([string]::IsNullOrEmpty($migrating)) {
|
||||||
write-host "Shutting down "+$vm
|
Get-VM $vm | Shutdown-VMGuest -Confirm:$false
|
||||||
#Get-VM $vm | Shutdown-VMGuest -Confirm:$false
|
|
||||||
} else {
|
|
||||||
write-host "MIGRATING "+$vm
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user