Update iscsi-sys-vm-shutdown-verify.ps1
This commit is contained in:
@@ -19,8 +19,10 @@ Do {
|
|||||||
if ($VMLIST -ne $null) {
|
if ($VMLIST -ne $null) {
|
||||||
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).PowerState -match 'PoweredOn') {
|
if ((Get-VM $VM) -eq $null) {
|
||||||
|
break
|
||||||
|
} elseif ((Get-VM $VM).PowerState -match 'PoweredOn') {
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
$poff = 'yes'
|
$poff = 'yes'
|
||||||
|
|||||||
Reference in New Issue
Block a user