9 lines
338 B
PowerShell
Executable File
9 lines
338 B
PowerShell
Executable File
#!/usr/bin/env pwsh
|
||
|
||
. /opt/idssys/powerwall/conf/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
|
||
|
||
Disconnect-VIServer -Server $args[0] -Force –Confirm:$false |