Files
powerwall/esxi-scripts/cls-shutdown.ps1
2023-11-04 16:39:58 -05:00

10 lines
279 B
PowerShell
Executable File

#!/usr/bin/env pwsh
. /opt/idssys/powerwall/settings.ps1
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null
Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -like '*CLS*'} | Shutdown-VMGuest -Confirm:$false
exit 0