This commit is contained in:
2023-11-04 16:39:58 -05:00
parent 6a31a425d0
commit afcb943fa5
2 changed files with 10 additions and 4 deletions

9
esxi-scripts/cls-shutdown.ps1 Executable file
View File

@@ -0,0 +1,9 @@
#!/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