From 54af332fbcbf4afcd005010e7c34cd6e8a198d9b Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Thu, 1 Feb 2024 16:18:52 -0600 Subject: [PATCH] update --- esxi-scripts/vm-shutdown.ps1 | 5 +++-- powerwall.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index 6672fdd2..5ababde6 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -6,8 +6,9 @@ Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Passwo $vmhosts=$args[0].Split(",") Foreach ($vmhost in $vmhosts) { - Get-VMHost | Where {$_.Name -eq $vmhost} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false - # Get-VMHost | Where {$_.Name -eq $vmhost} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} + # Get-VMHost | Where {$_.Name -eq $vmhost} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false + write-host $vmhost + Get-VMHost | Where {$_.Name -eq $vmhost} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} } Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false diff --git a/powerwall.sh b/powerwall.sh index 85d2263e..5664160c 100755 --- a/powerwall.sh +++ b/powerwall.sh @@ -11,7 +11,7 @@ source /opt/idssys/powerwall/inc/power.inc.sh source /opt/idssys/powerwall/inc/temp.inc.sh -# TEST=true +TEST=true shopt -s lastpipe