FUNDAMENTALS OF COMPUTER

OPERATING SYSTEMS FOR COMPUTERS

COMMAND LINE INTERFACE

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which cmdlet allows you to send the results of a cmdlet to a comma separated value (CSV) format?
A
Out-csv
B
Convertto-csv
C
change-csv
D
export-csv
Explanation: 

Detailed explanation-1: -The Export-CSV cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a character-separated list of the object’s property values. You can use the Export-CSV cmdlet to create spreadsheets and share data with programs that accept CSV files as input.

Detailed explanation-2: -To get output in a CSV file, use PowerShell Export-CSV cmdlet. Its syntax is given as <Data object> | Export-CSV [-Path] <string>, where the Export-CSV command will fetch the output of the Data object and save it as a CSV file at the specified Path.

Detailed explanation-3: -The Import-Csv cmdlet creates table-like custom objects from the items in CSV files.

Detailed explanation-4: -You can use the Export-Csv cmdlet to convert objects to CSV strings. Export-CSV is similar to ConvertTo-CSV, except that it saves the CSV strings to a file. The ConvertTo-CSV cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.

Detailed explanation-5: -The Export-CSV cmdlet converts the objects that you submit into a series of CSV variable-length strings and saves them in the specified text file. You can use Export-CSV * to save objects in a CSV file and then use the Import-Csv cmdlet to create objects from the text in the CSV file.

There is 1 question to complete.