update
This commit is contained in:
28
esxi-scripts/cooldown.overnight.ps1
Executable file
28
esxi-scripts/cooldown.overnight.ps1
Executable 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
28
esxi-scripts/coolup.overnight.ps1
Executable file
28
esxi-scripts/coolup.overnight.ps1
Executable 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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user