Import-Csv

 

Additional Resources for Import-Csv

 

Read in a Comma-Separated Values File

http://www.microsoft.com/technet/scriptcenter/topics/msh/cmdlets/import-csv.mspx

 

 

SYNOPSIS

Imports comma-separated value (CSV) files in the format produced by the Export-CSV cmdlet and returns objects that correspond to the objects represented in that CSV file.

 

SYNTAX

Import-Csv [-path] <string[]> [<CommonParameters>]

 

DETAILED DESCRIPTION

Imports comma-separated value (CSV) files in the format produced by the Export-CSV cmdlet and returns objects that correspond to the objects represented in that CSV file.

 

PARAMETERS

 

-path <string[]>

Specifies the path to the CSV file to import.

 

Required?

true

Position?

1

Default value

Null

Accept pipeline input?  

true (ByValue, ByPropertyName)

Accept wildcard characters? 

true

 

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. For more information, type, "get-help about_commonparameters".

 

INPUT TYPE

#TYPE CSV

 

RETURN TYPE

Objects

 

EXAMPLE 1

 

get-process | export-csv processes.csv

$processes = import-CSV processes.csv

$processes

 

This command exports information about processes to a CSV file and then restores that process information. In the first line of the command, the output of the Get-Process cmdlet is piped to the Export-CSVcmdlet which saves a representation of the output objects to the file named processes.csv. In the second line, the Import-CSV cmdlet is used to retrieve the saved object representation from the processes.csv file, create corresponding objects and store them in the $processes variable.

 

RELATED LINKS

Export-Csv

 

 

 

500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@systemmanager.forsenergy.ru to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.