How can you import and manipulate a CSV file

Importing a CSV file will allow you to work with it as though it were an object. Here is an example

get-process

get-process | export-csv process.csv

$process = import-csv process.csv

$process

$process | format-table

$process | where-object {$_.vm -gt 100000}

| Format-Table

 

Once imported the rows of the csv file become the objects you can manipulate. The column headings become the properties.

Comments

No Comments