Update iscsi-sys-vm-shutdown-verify.ps1

This commit is contained in:
2023-12-30 09:17:41 -06:00
parent 7772eab433
commit 9017e258f0

View File

@@ -15,14 +15,14 @@ $ESXI = Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -P
# }
Do {
$poff = yes
$poff = 'yes'
$VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM
Foreach ($VM in $VMLIST) {
if ((Get-VM $VM).PowerState -eq 'PoweredOn') {
$poff = no
if ((Get-VM $VM).PowerState -match 'PoweredOn') {
$poff = 'no'
}
}
} Until ($poff -eq yes)
} Until ($poff -match 'yes')