Commands / Text and objects

Import-Csv

Read a CSV file as objects

beginner Text and objects Aliases ipcsv

Import-Csv
 Import-Csv -Path .\people.csv
Works on
WindowsLinuxmacOS
PowerShell
5.1 and later
Reference
Microsoft Learn: Import-Csv

Each row becomes an object. Column headers become property names. All values are strings until you cast them.

Try this

Import-Csv -Path .\people.csv | Where-Object City -eq 'Albany'

Related commands