Contact Info

Crumbtrail » Administration » Powershell » Powershell 2.0 » Import-CSV

Import-CSV - Powershell 2.0 CmdLet

Microsoft Windows PowerShell is a command-line shell and scripting tool based on the Microsoft .NET Framework. It is designed for system administrators, engineers and developers to control and automate the administration of Windows and applications.

More than hundred command-line tools (so called "cmdlets") can be used to perform system administration tasks and Windows Management Instrumentation (WMI). These cmdlets are easy to use, with standard naming conventions and common parameters, and standard tools for piping, sorting, filtering, and formatting data and objects.


Short description
Converts object properties in a comma-separated value (CSV) file into CSV versions of the original objects.

Import-CSV [[-Delimiter] <char>] [-Path] <string[]> [-Header <string[]>] [<CommonParameters>]

Import-CSV -UseCulture [-Path] <string[]> [-Header <string[]>] [<CommonParameters>]

The Import-CSV cmdlet creates objects from CSV variable-length files that are generated by the Export-CSV cmdlet. 

You can use the parameters of the Import-CSV cmdlet to specify the column header row, which determines the property
 names of the resulting objects; to specify the item delimiter; or to direct Import-CSV to use the list separator f
or the current culture as the item delimiter.

The objects that Import-CSV creates are CSV versions of the original objects. The property values of the CSV object
s are string versions of the property values of the original objects. The CSV versions of the objects do not have a
ny methods.

You can also use the ConvertTo-CSV and ConvertFrom-CSV cmdlets to convert objects to CSV strings (and back). These 
cmdlets are the same as the Export-CSV and Import-CSV cmdlets, except that they do not save the CSV strings in a fi