File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -395,12 +395,16 @@ Begin{
395395 if (-not ([String ]::IsNullOrEmpty($Result.MAC )))
396396 {
397397 # Split it, so we can search the vendor (XX-XX-XX-XX-XX-XX to XX-XX-XX)
398- $MACVendor_Search = $Job_Result.MAC.Replace (" -" , " " ).Substring(0 , 6 )
398+ $MAC_VendorSearch = $Job_Result.MAC.Replace (" -" , " " ).Substring(0 , 6 )
399399
400- try {
401- $Vendor = (($MAC_VendorList | Where-Object {$_.Assignment -eq $MACVendor_Search })[0 ])." Organization Name"
402- }
403- catch {}
400+ foreach ($ListEntry in $MAC_VendorList )
401+ {
402+ if ($ListEntry.Assignment -eq $MAC_VendorSearch )
403+ {
404+ $Vendor = $ListEntry ." Organization Name"
405+ break
406+ }
407+ }
404408 }
405409
406410 $NewResult = [pscustomobject ] @ {
@@ -662,7 +666,7 @@ Process{
662666 Result = $Job.BeginInvoke ()
663667 }
664668
665- # Add Job to collection
669+ # Add job to collection
666670 [void ]$Jobs.Add ($JobObj )
667671 }
668672
You can’t perform that action at this time.
0 commit comments