diff --git a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 index c563d5a8..f7fa23a5 100755 --- a/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 +++ b/esxi-scripts/iscsi-sys-vm-shutdown-verify.ps1 @@ -16,7 +16,7 @@ $ESXI = Connect-VIServer -Server $args[0] -Protocol https -User $ESXiUsername -P Do { $VMLIST = Get-Datastore | Where {$_.Name -like '*iSCSI-SYS*'} | Get-VM write-host $VMLIST - if ($VMLIST -ne '') { + if ($VMLIST -ne $null) { write-host "cycling through iscsi vms found" $poff = 'no' Foreach ($VM in $VMLIST) {