Create sys-suspend.ps1

This commit is contained in:
2023-05-15 16:52:23 -05:00
parent 07fc935418
commit 5cac400ab9

7
esxi-scripts/sys-suspend.ps1 Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env pwsh
. /opt/idssys/powerwall/settings.ps1
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword
Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -like '*MySQL*' -and $_.Name -like '*PiHole*' -and $_.Name -like '*vCenter*'} | Suspend-VM