Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 11/18/2025
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: ConvertFrom-Csv
---
# ConvertFrom-Csv

## SYNOPSIS

Converts object properties in character-separated value (CSV) format into CSV versions of the
original objects.

Expand Down Expand Up @@ -145,7 +146,7 @@ the **InputObject** parameter and converts the CSV strings from the `$Services`

When the **UseCulture** parameter is used, be sure that the current culture's default list
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
generate objects from the CSV strings.
can't parse each column into distinct properties.

### Example 5: Convert CSV data in W3C Extended Log Format

Expand Down Expand Up @@ -176,12 +177,17 @@ time cs-method cs-uri

### -Delimiter

Specifies the delimiter that separates the property values in the CSV strings. The default is a
comma (`,`). Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in
single quotation marks.
Specifies the delimiter that separates the property values in the CSV data. The default is a comma
(`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

If you specify a character other than the actual string delimiter in the file, `ConvertFrom-Csv`
can't create the objects from the CSV strings and returns the CSV strings.
If the specified character doesn't match the actual delimiter in the CSV data, `ConvertFrom-Csv`
can't parse each column into distinct properties. In this case, it outputs one **PSCustomObject**
per row, each containing a single property whose name is the full header and whose value is the row
text.

```yaml
Type: System.Char
Expand Down
8 changes: 6 additions & 2 deletions reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 03/14/2023
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertto-csv?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: ConvertTo-Csv
Expand All @@ -11,6 +11,7 @@ title: ConvertTo-Csv
# ConvertTo-Csv

## SYNOPSIS

Converts .NET objects into a series of character-separated value (CSV) strings.

## SYNTAX
Expand Down Expand Up @@ -109,7 +110,10 @@ information header from the CSV output.
### -Delimiter

Specifies the delimiter to separate the property values in CSV strings. The default is a comma
(`,`). Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
(`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

```yaml
Expand Down
44 changes: 28 additions & 16 deletions reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 03/14/2023
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/export-csv?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand All @@ -13,6 +13,7 @@ title: Export-Csv
# Export-Csv

## SYNOPSIS

Converts objects into a series of character-separated value (CSV) strings and saves the strings to a
file.

Expand Down Expand Up @@ -142,11 +143,12 @@ Get-Content -Path .\Processes.csv
The `Get-Culture` cmdlet uses the nested properties **TextInfo** and **ListSeparator** and displays
the current culture's default list separator. The `Get-Process` cmdlet gets **Process** objects. The
process objects are sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts the
process objects to a series of CSV strings. The **Path** parameter specifies that the `Processes.csv`
file is saved in the current directory. The **UseCulture** parameter uses the current culture's
default list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE**
information header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet
uses the **Path** parameter to display the file located in the current directory.
process objects to a series of CSV strings. The **Path** parameter specifies that the
`Processes.csv` file is saved in the current directory. The **UseCulture** parameter uses the
current culture's default list separator as the delimiter. The **NoTypeInformation** parameter
removes the **#TYPE** information header from the CSV output and is not required in PowerShell 6.
The `Get-Content` cmdlet uses the **Path** parameter to display the file located in the current
directory.

### Example 5: Export processes with type information

Expand Down Expand Up @@ -176,10 +178,15 @@ This example describes how to export objects to a CSV file and use the **Append*
objects to an existing file.

```powershell
$AppService = (Get-Service -DisplayName *Application* | Select-Object -Property DisplayName, Status)
$AppService = Get-Service -DisplayName *Application* |
Select-Object -Property DisplayName, Status

$AppService | Export-Csv -Path .\Services.Csv -NoTypeInformation
Get-Content -Path .\Services.Csv
$WinService = (Get-Service -DisplayName *Windows* | Select-Object -Property DisplayName, Status)

$WinService = Get-Service -DisplayName *Windows* |
Select-Object -Property DisplayName, Status

$WinService | Export-Csv -Path .\Services.csv -NoTypeInformation -Append
Get-Content -Path .\Services.Csv
```
Expand Down Expand Up @@ -218,7 +225,8 @@ unexpected output is received, troubleshoot the pipeline syntax.

```powershell
Get-Date | Select-Object -Property DateTime, Day, DayOfWeek, DayOfYear |
Export-Csv -Path .\DateTime.csv -NoTypeInformation
Export-Csv -Path .\DateTime.csv -NoTypeInformation

Get-Content -Path .\DateTime.csv
```

Expand All @@ -229,7 +237,8 @@ Get-Content -Path .\DateTime.csv

```powershell
Get-Date | Format-Table -Property DateTime, Day, DayOfWeek, DayOfYear |
Export-Csv -Path .\FTDateTime.csv -NoTypeInformation
Export-Csv -Path .\FTDateTime.csv -NoTypeInformation

Get-Content -Path .\FTDateTime.csv
```

Expand All @@ -245,10 +254,10 @@ Get-Content -Path .\FTDateTime.csv
The `Get-Date` cmdlet gets the **DateTime** object. The object is sent down the pipeline to the
`Select-Object` cmdlet. `Select-Object` uses the **Property** parameter to select a subset of object
properties. The object is sent down the pipeline to the `Export-Csv` cmdlet. `Export-Csv` converts
the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved in
the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information header
from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the **Path**
parameter to display the CSV file located in the current directory.
the object to a CSV format. The **Path** parameter specifies that the `DateTime.csv` file is saved
in the current directory. The **NoTypeInformation** parameter removes the **#TYPE** information
header from the CSV output and is not required in PowerShell 6. The `Get-Content` cmdlet uses the
**Path** parameter to display the CSV file located in the current directory.

When the `Format-Table` cmdlet is used within the pipeline to select properties unexpected results
are received. `Format-Table` sends table format objects down the pipeline to the `Export-Csv` cmdlet
Expand Down Expand Up @@ -372,8 +381,11 @@ Accept wildcard characters: False

### -Delimiter

Specifies a delimiter to separate the property values. The default is a comma (`,`). Enter a
character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in quotation marks.
Specifies a delimiter to separate the property values. The default is a comma (`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

```yaml
Type: System.Char
Expand Down
15 changes: 9 additions & 6 deletions reference/5.1/Microsoft.PowerShell.Utility/Import-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 01/09/2025
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/import-csv?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
aliases:
Expand All @@ -13,6 +13,7 @@ title: Import-Csv
# Import-Csv

## SYNOPSIS

Creates table-like custom objects from the items in a character-separated value (CSV) file.

## SYNTAX
Expand Down Expand Up @@ -271,8 +272,8 @@ Import-Csv -Path .\Projects.csv
```

```Output
WARNING: One or more headers weren't specified. Default names starting with "H" have been used in
place of any missing headers.
WARNING: One or more headers weren't specified. Default names starting with "H" have been
used in place of any missing headers.

ProjectID ProjectName H1 Completed
--------- ----------- -- ---------
Expand All @@ -292,12 +293,14 @@ displays a warning message because **H1** is a default header name.
Specifies the delimiter that separates the property values in the CSV file. The default is a comma
(`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

If you specify a character other than the actual string delimiter in the file, `Import-Csv` can't
create the objects from the CSV strings and returns the full CSV strings.
If the specified character doesn't match the actual delimiter in the CSV data, `Import-Csv` can't
parse each column into distinct properties. In this case, it outputs one **PSCustomObject** per
row, each containing a single property whose name is the full header and whose value is the row
text.

```yaml
Type: System.Char
Expand Down
20 changes: 13 additions & 7 deletions reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 11/18/2025
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: ConvertFrom-Csv
---
# ConvertFrom-Csv

## SYNOPSIS

Converts object properties in character-separated value (CSV) format into CSV versions of the
original objects.

Expand Down Expand Up @@ -145,7 +146,7 @@ the **InputObject** parameter and converts the CSV strings from the `$Services`

When the **UseCulture** parameter is used, be sure that the current culture's default list
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
generate objects from the CSV strings.
can't parse each column into distinct properties.

### Example 5: Convert CSV data in W3C Extended Log Format

Expand Down Expand Up @@ -177,12 +178,17 @@ time cs-method cs-uri

### -Delimiter

Specifies the delimiter that separates the property values in the CSV strings. The default is a
comma (`,`). Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in
single quotation marks.
Specifies the delimiter that separates the property values in the CSV data. The default is a comma
(`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

If you specify a character other than the actual string delimiter in the file, `ConvertFrom-Csv`
can't create the objects from the CSV strings and returns the CSV strings.
If the specified character doesn't match the actual delimiter in the CSV data, `ConvertFrom-Csv`
can't parse each column into distinct properties. In this case, it outputs one **PSCustomObject**
per row, each containing a single property whose name is the full header and whose value is the row
text.

```yaml
Type: System.Char
Expand Down
8 changes: 6 additions & 2 deletions reference/7.4/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
Locale: en-US
Module Name: Microsoft.PowerShell.Utility
ms.date: 03/14/2023
ms.date: 12/27/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertto-csv?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: ConvertTo-Csv
Expand All @@ -11,6 +11,7 @@ title: ConvertTo-Csv
# ConvertTo-Csv

## SYNOPSIS

Converts .NET objects into a series of character-separated value (CSV) strings.

## SYNTAX
Expand Down Expand Up @@ -186,7 +187,10 @@ only the key is converted to CSV.
### -Delimiter

Specifies the delimiter to separate the property values in CSV strings. The default is a comma
(`,`). Enter a character, such as a colon (`:`). To specify a semicolon (`;`) enclose it in single
(`,`).

Enter a character, such as a colon (`:`). To specify a semicolon (`;`), enclose it in single
quotation marks. To specify escaped special characters such as tab (`` `t ``), enclose it in double
quotation marks.

```yaml
Expand Down
Loading