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