Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Powershell - Import-CSV filter concatenated column

$
0
0

I concatenated 3 columns of CSV file, and need to filter based on those values in those 3 columns.

I managed to concatenate these 3 columns but no idea how to filter results based on it, below returns nothing:


Import-Csv "C:\1.csv" | Select-Object  @{n=’ResourceName’;e={$_.FIRST_NAME + "," + $_.LAST_NAME + "," + $_.ADDRESS} `
| Where-Object {$_.FIRST_NAME -like "Petar" -and $_.LAST_NAME -like "Petrovic" -and $_.ADDRESS -like "Prvomajska 1"}




Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>