Export-Csv
Use Export-Csv to convert objects into CSV-formatted data and write it to a file. See Microsoft.PowerShell.Utility module requirements and examples.
Documentation: Microsoft Learn — export-csv
Syntax
See the command anatomy
Read the command and its supplied arguments. This example requires real PowerShell or its module; this diagram does not execute it.
Export-Csv [[-Path] <string>] [-Delimiter <Char>] [-NoTypeInformation] [-Append] [-Force] [-Encoding <Encoding>] [<CommonParameters>]- Stage 1Export-Csv
-Path -Delimiter -NoTypeInformation -Append -Force -Encoding
Try it
PowerShell example · browser support is limited.
Execution scope: The full example below requires PowerShell outside this browser. You can edit this runner to use the supported practice commands; unsupported syntax returns an explanation.
Follow the objects
Run the command to inspect each stage.
Examples
Get-Service -NoTypeInformation
Show reference output
Illustrative output · values vary by environment
(No pipeline output. The selected objects were written to the CSV file.)
Get-ADUser -Filter *
Show reference output
Illustrative output · values vary by environment
(No pipeline output. The selected objects were written to the CSV file.)
Parameters
Parameter definitions:
-Path-Delimiter-NoTypeInformation-Append-Force-Encoding
Export objects rather than formatted text
Export-Csv writes object properties as columns. Select the desired properties before exporting. Sending Format-Table output to it exports formatting records instead of your original data.
Choose the file contract
Set a delimiter and encoding appropriate to the reader. Encoding defaults differ between Windows PowerShell and newer PowerShell releases, so specify one when exchanging files between systems. -NoTypeInformation keeps a Windows PowerShell export free of its type-information line.
Appending needs a stable schema
Keep the same property names when appending rows. Review mismatched columns rather than using -Force to hide the problem. Ensure the parent folder exists and that your account can write to it.
Reopen a test export with Import-Csv and compare its column names and row count. Imported values usually require conversion when later calculations need numbers or dates.
Choose CSV columns · Read back a CSV file
Updated 1 October 2026. Browser outputs are fictional; check the installed module help for your environment.
Put this command to work
Write your first report
Save Name and Status for all services to C:\Lab\report.csv without type information.
The sandbox is visible now. Sign in with Google only when you run or check a task; commands and temporary files are discarded when you leave.
Run a command to inspect its result.
Inspect starting data
Supported syntax
Virtual files
Recap
Export-Csv Use Export-Csv to convert objects into CSV-formatted data and write it to a file. See Microsoft.PowerShell.Utility module requirements and examples.
Next: ConvertFrom-Json