Update offsite-vm-shutdown.ps1

This commit is contained in:
2024-02-05 22:44:35 -06:00
parent 80c4ab3c43
commit da63b1a0aa

View File

@@ -1,6 +1,7 @@
#!/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
Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'}