update
This commit is contained in:
9
esxi-scripts/iscsi-all-vm-shutdown.ps1
Executable file
9
esxi-scripts/iscsi-all-vm-shutdown.ps1
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env pwsh
|
||||
|
||||
. /opt/idssys/powerwall/settings.ps1
|
||||
|
||||
Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -Password $ESXiPassword | Out-Null
|
||||
|
||||
Get-Datastore | Where {$_.Name -like '*iSCSI-*'} | Get-VM | Where {$_.PowerState -like '*On*' -and $_.Name -notlike '*CLS*'} | Shutdown-VMGuest -Confirm:$false
|
||||
|
||||
exit 0
|
||||
Reference in New Issue
Block a user