diff --git a/defaults.inc b/defaults.inc index e3d6e076..83d51730 100755 --- a/defaults.inc +++ b/defaults.inc @@ -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 ' diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index f9c2b663..0af35066 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -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 } } }