Import-Csv

noun

say it: “IM-port SEE-ESS-VEE” /ˈɪmpɔrt ˌsiˌɛsˈvi/

A PowerShell command that reads a CSV file and turns each row into an object, with one property for each column.

What does Import-Csv do?

Import-Csv reads a CSV file and turns every line under the header into one object, with one property per column, named after its heading. Then Where-Object, Sort-Object, Group-Object and Measure-Object work on the rows as on any objects. Every value arrives as text, so turn numbers into numbers ([decimal], [int]) before you sort or compare them.

Import-Csv sales-2026-10.csv | Where-Object Store -eq 'Downtown' | Format-Table

In a sentence

  • “Import-Csv turned the bike shop's sales export into objects, so Where-Object could keep only the Downtown rows.”
  • “After Import-Csv, every row had a Store, a Product and a Qty property, named after the headings.”

Level: Apprentice · More PowerShell terms at this level

Updated