From c3703a51ff8396b22d2f47b41cb29a859abb539a Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Wed, 31 Jan 2024 10:24:26 -0600 Subject: [PATCH] Update vm-shutdown.ps1 --- esxi-scripts/vm-shutdown.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esxi-scripts/vm-shutdown.ps1 b/esxi-scripts/vm-shutdown.ps1 index 6520959f..92e873e1 100755 --- a/esxi-scripts/vm-shutdown.ps1 +++ b/esxi-scripts/vm-shutdown.ps1 @@ -1,13 +1,13 @@ #!/usr/bin/env pwsh . /opt/idssys/powerwall/settings.ps1 -Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null +# Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null #Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false write-host "$args[0]" -Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} +# Get-VMHost | Where {$args[0]} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false