Updates from: 08/05/2021 03:11:51
Service Microsoft Docs article Related commit history on GitHub Change details
Microsoft.PowerShell.Core About Automatic Variables (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 07/06/2021 Last updated : 08/04/2021 no-loc: [Reset, Current] online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0
To prevent an error from being added to the `$Error` array, use the
**ErrorAction** common parameter with a value of **Ignore**. For more information, see [about_CommonParameters](about_CommonParameters.md).
+### $ErrorView
+
+Contains the value controlling the view in which errors are displayed. The
+`$ErrorView` variable accepts strings and has a default value of `NormalView`.
+If a string other than an accepted value is defined, the default is used.
+
+Accepted values:
+
+- `CategoryView` - Only displays the error category information.
+- `NormalView` - Provides a standard PowerShell error view containing the
+ error, line number, category info and more.
+ ### $Event Contains a **PSEventArgs** object that represents the event that is being
are unnamed functions).
> You cannot use the `$input` variable inside both the Process block and the > End block in the same function or script block.
-Since `$input` is an enumerator, accessing any of it's properties causes
+Since `$input` is an enumerator, accessing any of its properties causes
`$input` to no longer be available. You can store `$input` in another variable to reuse the `$input` properties.
Microsoft.PowerShell.Utility Convertto Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## SYNOPSIS
+## Synopsis
Converts .NET objects into a series of comma-separated value (CSV) strings.
-## SYNTAX
+## Syntax
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <psobject> [[-Delimiter] <char>] [-NoTypeInformatio
ConvertTo-Csv [-InputObject] <psobject> [-UseCulture] [-NoTypeInformation] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## EXAMPLES
+## Examples
### Example 1: Convert an object to CSV
objects to a series of CSV strings. The **UseCulture** parameter uses the curren
list separator as the delimiter. The **NoTypeInformation** parameter removes the **#TYPE** information header from the CSV output.
-## PARAMETERS
+## Parameters
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV output is returned as a collection of strings.
-## NOTES
+## Notes
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Csv (5.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/5.1/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## SYNOPSIS
+## Synopsis
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## SYNTAX
+## Syntax
### Delimiter (Default)
Export-Csv [[-Path] <string>] -InputObject <psobject> [-LiteralPath <string>] [-
[<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## EXAMPLES
+## Examples
### Example 1: Export process properties to a CSV file
The `Export-Csv` cmdlet **Force** parameter is used to force the export to write
**Edition** property is discarded. The `Import-Csv` cmdlet uses the **Path** parameter to display the file located in the current directory.
-## PARAMETERS
+## Parameters
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV list is sent to the file designated in the Path parameter.
-## NOTES
+## Notes
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV 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 `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Core About Automatic Variables (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 07/06/2021 Last updated : 08/04/2021 no-loc: [Reset, Current] online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7&WT.mc_id=ps-gethelp schema: 2.0.0
To prevent an error from being added to the `$Error` array, use the
**ErrorAction** common parameter with a value of **Ignore**. For more information, see [about_CommonParameters](about_CommonParameters.md).
+### $ErrorView
+
+Contains the value controlling the view in which errors are displayed. The
+`$ErrorView` variable accepts strings or **ErrorView** objects and has a
+default value of `ConciseView`. If a string other than an accepted value is
+defined, an error is thrown.
+
+Accepted values:
+
+- `CategoryView` - Only displays the error category information.
+- `ConciseView` - Only displays the error message. If the error is a parser
+ error or comes from a script, a location pointer is included. This view was
+ added in PowerShell 7.0
+- `NormalView` - Provides a standard PowerShell error view containing the error
+ message, location, category info and more.
+ ### $Event Contains a **PSEventArgs** object that represents the event that is being
are unnamed functions).
> You cannot use the `$input` variable inside both the Process block and the > End block in the same function or script block.
-Since `$input` is an enumerator, accessing any of it's properties causes
+Since `$input` is an enumerator, accessing any of its properties causes
`$input` to no longer be available. You can store `$input` in another variable to reuse the `$input` properties.
Microsoft.PowerShell.Utility Convertto Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## SYNOPSIS
+## Synopsis
Converts .NET objects into a series of character-separated value (CSV) strings.
-## SYNTAX
+## Syntax
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## EXAMPLES
+## Examples
### Example 1: Convert an object to CSV
DisplayHint,"DateTime","Date",Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minu
DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thursday,234,11,Local,569,27,8,34,637020700545699784,11:27:34.5699784,2019 ```
-### Example 4: Convert to CSV with quotes only when needed
+### Example 5: Convert to CSV with quotes only when needed
This example converts a **DateTime** object to a CSV string.
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+## Parameters
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV output is returned as a collection of strings.
-## NOTES
+## Notes
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Csv (7.0) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.0/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## SYNOPSIS
+## Synopsis
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## SYNTAX
+## Syntax
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## EXAMPLES
+## Examples
### Example 1: Export process properties to a CSV file
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+## Parameters
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV list is sent to the file designated in the Path parameter.
-## NOTES
+## Notes
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Core About Automatic Variables (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 07/06/2021 Last updated : 08/04/2021 no-loc: [Reset, Current] online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.1&WT.mc_id=ps-gethelp schema: 2.0.0
To prevent an error from being added to the `$Error` array, use the
**ErrorAction** common parameter with a value of **Ignore**. For more information, see [about_CommonParameters](about_CommonParameters.md).
+### $ErrorView
+
+Contains the value controlling the view in which errors are displayed. The
+`$ErrorView` variable accepts strings or **ErrorView** objects and has a
+default value of `ConciseView`. If a string other than an accepted value is
+defined, an error is thrown.
+
+Accepted values:
+
+- `CategoryView` - Only displays the error category information.
+- `ConciseView` - Only displays the error message. If the error is a parser
+ error or comes from a script, a location pointer is included. This view was
+ added in PowerShell 7.0
+- `NormalView` - Provides a standard PowerShell error view containing the error
+ message, location, category info and more.
+ ### $Event Contains a **PSEventArgs** object that represents the event that is being
are unnamed functions).
> You cannot use the `$input` variable inside both the Process block and the > End block in the same function or script block.
-Since `$input` is an enumerator, accessing any of it's properties causes
+Since `$input` is an enumerator, accessing any of its properties causes
`$input` to no longer be available. You can store `$input` in another variable to reuse the `$input` properties.
Microsoft.PowerShell.Utility Convertto Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## SYNOPSIS
+## Synopsis
Converts .NET objects into a series of character-separated value (CSV) strings.
-## SYNTAX
+## Syntax
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## EXAMPLES
+## Examples
### Example 1: Convert an object to CSV
DisplayHint,"DateTime","Date",Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minu
DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thursday,234,11,Local,569,27,8,34,637020700545699784,11:27:34.5699784,2019 ```
-### Example 4: Convert to CSV with quotes only when needed
+### Example 5: Convert to CSV with quotes only when needed
This example converts a **DateTime** object to a CSV string.
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+## Parameters
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV output is returned as a collection of strings.
-## NOTES
+## Notes
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Csv (7.1) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.1/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## SYNOPSIS
+## Synopsis
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## SYNTAX
+## Syntax
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## EXAMPLES
+## Examples
### Example 1: Export process properties to a CSV file
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+## Parameters
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV list is sent to the file designated in the Path parameter.
-## NOTES
+## Notes
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Core About Automatic Variables (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md
--- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US Previously updated : 07/22/2021 Last updated : 08/04/2021 no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline] online version: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0
To prevent an error from being added to the `$Error` array, use the
**ErrorAction** common parameter with a value of **Ignore**. For more information, see [about_CommonParameters](about_CommonParameters.md).
+### $ErrorView
+
+Contains the value controlling the view in which errors are displayed. The
+`$ErrorView` variable accepts strings or **ErrorView** objects and has a
+default value of `ConciseView`. If a string other than an accepted value is
+defined, an error is thrown.
+
+Accepted values:
+
+- `CategoryView` - Only displays the error category information.
+- `ConciseView` - Only displays the error message. If the error is a parser
+ error or comes from a script, a location pointer is included. This view was
+ added in PowerShell 7.0
+- `DetailedView` - Displays a verbose error message including all error
+ information. This view was added in PowerShell 7.2
+- `NormalView` - Provides a standard PowerShell error view containing the error
+ message, location, category info and more.
+ ### $Event Contains a **PSEventArgs** object that represents the event that is being
are unnamed functions).
> You cannot use the `$input` variable inside both the Process block and the > End block in the same function or script block.
-Since `$input` is an enumerator, accessing any of it's properties causes
+Since `$input` is an enumerator, accessing any of its properties causes
`$input` to no longer be available. You can store `$input` in another variable to reuse the `$input` properties.
Microsoft.PowerShell.Utility Convertto Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/ConvertTo-Csv.md
Title: ConvertTo-Csv
# ConvertTo-Csv
-## SYNOPSIS
+## Synopsis
Converts .NET objects into a series of character-separated value (CSV) strings.
-## SYNTAX
+## Syntax
### Delimiter (Default)
ConvertTo-Csv [-InputObject] <PSObject> [-UseCulture] [-IncludeTypeInformation]
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `ConvertTo-CSV` cmdlet returns a series of comma-separated value (CSV) strings that represent the objects that you submit. You can then use the `ConvertFrom-Csv` cmdlet to recreate objects from
You can use the `Export-Csv` cmdlet to convert objects to CSV strings. `Export-C
The `ConvertTo-CSV` cmdlet has parameters to specify a delimiter other than a comma or use the current culture as the delimiter.
-## EXAMPLES
+## Examples
### Example 1: Convert an object to CSV
DisplayHint,"DateTime","Date",Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minu
DateTime,"Thursday, August 22, 2019 11:27:34 AM","8/22/2019 12:00:00 AM",22,Thursday,234,11,Local,569,27,8,34,637020700545699784,11:27:34.5699784,2019 ```
-### Example 4: Convert to CSV with quotes only when needed
+### Example 5: Convert to CSV with quotes only when needed
This example converts a **DateTime** object to a CSV string.
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+### Example 6: Convert hashtables to CSV
+
+In PowerShell 7.2 and above, when you convert hashtables to CSV, the keys of the first hashtable are
+serialized and used as headers in the output.
+
+```powershell
+$person1 = @{
+ Name = 'John Smith'
+ Number = 1
+}
+
+$person2 = @{
+ Name = 'Jane Smith'
+ Number = 1
+}
+
+$allPeople = $person1, $person2
+$allPeople | ConvertTo-Csv
+```
+
+```Output
+"Name","Number"
+"John Smith","1"
+"Jane Smith","2"
+```
+
+### Example 7: Converting hashtables to CSV with additional properties
+
+In PowerShell 7.2 and above, when you convert a hashtable that has additional properties added with
+`Add-Member` or `Select-Object` the additional properties are also added as a header in the CSV
+output.
+
+```powershell
+$allPeople | Add-Member -Name ExtraProp -Value 42
+$allPeople | ConvertTo-Csv
+```
+
+```Output
+"Name","Number","ExtraProp"
+"John Smith","1","42"
+"Jane Smith","2","42"
+```
+
+Each hashtable has a property named `ExtraProp` added by `Add-Member` and then converted to CSV. You
+can see `ExtraProp` is now a header in the output.
+
+If an added property has the _same_ name as a key from the hashtable, the key takes precedence and
+only the key is converted to CSV.
+
+## Parameters
### -Delimiter
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object that has an Extended Type System (ETS) adapter to `ConvertTo-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV output is returned as a collection of strings.
-## NOTES
+## Notes
In CSV format, each object is represented by a comma-separated list of its property value. The property values are converted to strings using the object's **ToString()** method. The strings are
the properties of the first object that you submit. If the remaining objects do
specified properties, the property value of that object is Null, as represented by two consecutive commas. If the remaining objects have additional properties, those property values are ignored.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)
Microsoft.PowerShell.Utility Export Csv (7.2) https://github.com/MicrosoftDocs/PowerShell-Docs/commits/staging/reference/7.2/Microsoft.PowerShell.Utility/Export-Csv.md
Title: Export-Csv
--- # Export-Csv
-## SYNOPSIS
+## Synopsis
Converts objects into a series of comma-separated value (CSV) strings and saves the strings to a file.
-## SYNTAX
+## Syntax
### Delimiter (Default)
Export-Csv -InputObject <PSObject> [[-Path] <String>] [-LiteralPath <String>] [-
[-QuoteFields <String[]>] [-UseQuotes <QuoteKind>] [-WhatIf] [-Confirm] [<CommonParameters>] ```
-## DESCRIPTION
+## Description
The `Export-CSV` cmdlet creates a CSV file of the objects that you submit. Each object is a row that includes a comma-separated list of the object's property values. You can use the `Export-CSV`
Do not format objects before sending them to the `Export-CSV` cmdlet. If `Export
formatted objects the CSV file contains the format properties rather than the object properties. To export only selected properties of an object, use the `Select-Object` cmdlet.
-## EXAMPLES
+## Examples
### Example 1: Export process properties to a CSV file
DisplayHint,DateTime,Date,Day,DayOfWeek,DayOfYear,Hour,Kind,Millisecond,Minute,M
DateTime,"Thursday, August 22, 2019 11:31:00 AM",8/22/2019 12:00:00 AM,22,Thursday,234,11,Local,713,31,8,0,637020702607132640,11:31:00.7132640,2019 ```
-## PARAMETERS
+### Example 12: Convert hashtables to CSV
+
+In PowerShell 7.2 and above, when you export hashtables to CSV, the keys of the first hashtable are
+serialized and used as headers in the csv file output.
+
+```powershell
+$person1 = @{
+ Name = 'John Smith'
+ Number = 1
+}
+
+$person2 = @{
+ Name = 'Jane Smith'
+ Number = 1
+}
+
+$allPeople = $person1, $person2
+$allPeople | Export-Csv -Path .\People.csv
+
+Get-Content -Path .\People.csv
+```
+
+```Output
+"Name","Number"
+"John Smith","1"
+"Jane Smith","2"
+```
+
+### Example 13: Converting hashtables to CSV with additional properties
+
+In PowerShell 7.2 and above, when you export a hashtable that has additional properties added with
+`Add-Member` or `Select-Object` the additional properties are also added as a header in the CSV
+file.
+
+```powershell
+$allPeople | Add-Member -Name ExtraProp -Value 42
+$allPeople | Export-Csv
+
+Get-Content -Path .\People.csv -Path .\People.csv
+```
+
+```Output
+"Name","Number","ExtraProp"
+"John Smith","1","42"
+"Jane Smith","2","42"
+```
+
+Each hashtable has a property named `ExtraProp` added by `Add-Member` and then exported to CSV. You
+can see `ExtraProp` is now a header in the CSV file output.
+
+If an added property has the _same_ name as a key from the hashtable, the key takes precedence and
+only the key is exported to CSV.
+
+## Parameters
### -Append
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
-## INPUTS
+## Inputs
### System.Management.Automation.PSObject You can pipe any object with an Extended Type System (ETS) adapter to `Export-CSV`.
-## OUTPUTS
+## Outputs
### System.String The CSV list is sent to the file designated in the Path parameter.
-## NOTES
+## Notes
The `Export-CSV` cmdlet converts the objects that you submit into a series of CSV strings and saves them in the specified text file. You can use `Export-CSV -IncludeTypeInformation` to save objects
The `ConvertTo-Csv` and `ConvertFrom-Csv` cmdlets convert objects to CSV strings
strings. `Export-CSV` is the same as `ConvertTo-CSV`, except that it saves the CSV strings in a file.
-## RELATED LINKS
+## Related links
[ConvertFrom-Csv](ConvertFrom-Csv.md)