9 lines
401 B
PowerShell
Executable File
9 lines
401 B
PowerShell
Executable File
#!/usr/bin/env pwsh
|
||
. /opt/idssys/powerwall/conf/settings.ps1
|
||
|
||
Connect-VIServer -Server $VCENTERHOST -Protocol https -User $VCENTERUSER -Password $VCENTERPASS | Out-Null
|
||
|
||
Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false
|
||
|
||
Disconnect-VIServer -Server $VCENTERHOST -Force –Confirm:$false
|