This commit is contained in:
2024-07-23 17:36:14 -05:00
parent ad2dbd2f5c
commit cdcc9c1170
4 changed files with 73 additions and 2 deletions

View File

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

View File

@@ -0,0 +1,28 @@
#!/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*'} | Start-VM -Confirm:$false
Disconnect-VIServer -Server $VCENTERHOST -Force Confirm:$false