Update iscsi-sys-vm-shutdown-verify.ps1
This commit is contained in:
@@ -20,9 +20,8 @@ Do {
|
||||
write-host "cycling through iscsi vms found"
|
||||
$poff = 'no'
|
||||
Foreach ($VM in $VMLIST) {
|
||||
if ((Get-VM $VM) -eq $null) {
|
||||
break
|
||||
} elseif ((Get-VM $VM).PowerState -match 'PoweredOn') {
|
||||
$VMI = Get-VM $VM
|
||||
if ($VMI -eq $null -Or $VMI.PowerState -match 'PoweredOn') {
|
||||
break
|
||||
} else {
|
||||
$poff = 'yes'
|
||||
|
||||
Reference in New Issue
Block a user