From 75f291b86ca2a3ee6fbec2f03b89914d8080cd15 Mon Sep 17 00:00:00 2001 From: David Schroeder Date: Mon, 5 Feb 2024 22:45:55 -0600 Subject: [PATCH] Update offsite-vm-shutdown.ps1 --- esxi-scripts/offsite-vm-shutdown.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esxi-scripts/offsite-vm-shutdown.ps1 b/esxi-scripts/offsite-vm-shutdown.ps1 index 42011eec..3081e16e 100755 --- a/esxi-scripts/offsite-vm-shutdown.ps1 +++ b/esxi-scripts/offsite-vm-shutdown.ps1 @@ -1,8 +1,8 @@ #!/usr/bin/env pwsh . /opt/idssys/powerwall/settings.ps1 -Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false -Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null +# Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false | Out-Null +Connect-VIServer -Force -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} Foreach ($vm in $vms)