29 lines
480 B
PowerShell
Executable File
29 lines
480 B
PowerShell
Executable File
#!/usr/bin/env pwsh
|
||
. /opt/idssys/powerwall/settings.ps1
|
||
|
||
Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
|
||
|
||
Get-VM | Where {$_.Name -like '*OMSA*' -or $_.Name -like '*RustDesk Server*' -or $_.Name -like '*MySQL-Manager*' | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*Offsite-Backups*'} | Shutdown-VMGuest -Confirm:$false
|
||
|
||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|