Exporting reports to CSV files

If your boss asks for a report, they probably want it in the form of a spreadsheet. The easiest way to create a spreadsheet from a PowerCLI report is to export it to a CSV file. This CSV file can be imported into a spreadsheet. Another use case for CSV files is creating export files of one system that you can use later to import into another system. For example, you can use CSV files to export the settings of a vCenter Server and import them in another vCenter Server. PowerShell contains the Export-CSV cmdlet to create CSV files. The syntax of the Export-CSV cmdlet is as follows. The first parameter set can be used to specify a delimiter to separate the property values:

Export-Csv [[-Path] <String>] [[-Delimiter] ...

Get Learning PowerCLI - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.