Import-Csv

Import comma-separated value (CSV) files in the format produced by Export-CSV.

Syntax
      Import-Csv [-path] string[] [CommonParameters]

Key
   -Path path    The path to the CSV file {may be piped}

   CommonParameters:
       -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutVariable.

Import-Csv will return objects that correspond to the objects represented in the original CSV file.

Examples

Get ACL information for the Windows directory:

PS C:\>get-process | export-csv Proc.csv
$processes = import-CSV Proc.csv
$processes

"A thing that has no value does not exist" - Robert Pirsig

Related Powershell Commands:

Export-Csv - Export to Comma Separated Values (spreadsheet)



Back to the Top

Simon Sheppard
SS64.com