Book Image

Learning PowerCLI for VMware VSphere

By : Robert van den Nieuwendijk
Book Image

Learning PowerCLI for VMware VSphere

By: Robert van den Nieuwendijk

Overview of this book

Table of Contents (17 chapters)
Learning PowerCLI
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Exporting reports to CSV files


If your boss asks for a report, he probably wants 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 in 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 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:

Export-Csv [[-Path] <String>] [[-Delimiter] <Char>] [-Append] [-Encoding <String>] [-Force] [-LiteralPath <String>] [-NoClobber] [-NoTypeInformation] -InputObject <PSObject> [-Confirm] [-WhatIf] [<CommonParameters>]

Export-Csv [[-Path] <String>] [-Append] [-Encoding <String>] [-Force] [-LiteralPath <String>] [-NoClobber] [-NoTypeInformation...