diff --git a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 index 061030b1..3e25e34f 100755 --- a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 @@ -17,7 +17,7 @@ Do { $poff = 'no' $VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM write-host $VMLIST - if ($VMLIST -notmatch '') { + if ($VMLIST -ne '') { write-host "cycling thoruygh iscsi vms found" Foreach ($VM in $VMLIST) { if ((Get-VM $VM).PowerState -notmatch 'PoweredOn') {