diff --git a/esxi-scripts/host-shutdown.ps1 b/esxi-scripts/host-shutdown.ps1 new file mode 100755 index 00000000..07f53b67 --- /dev/null +++ b/esxi-scripts/host-shutdown.ps1 @@ -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 -notlike '*CLS*' -and $_.Name -notlike '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false diff --git a/esxi-scripts/iscsi-server-shutdown.ps1 b/esxi-scripts/iscsi-server-shutdown.ps1 new file mode 100755 index 00000000..344fda6f --- /dev/null +++ b/esxi-scripts/iscsi-server-shutdown.ps1 @@ -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 {$_.Name -like '*iSCSI*'} | Shutdown-VMGuest -Confirm:$false