From 6822f1aaf6154698468e4c12a18bc5baffe7de03 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 18 Nov 2025 09:29:16 -0600 Subject: [PATCH 1/2] Add example and note for W3C log format support (#12515) --- .../ConvertFrom-Csv.md | 33 ++++++++++++++++- .../ConvertFrom-Csv.md | 34 ++++++++++++++++- .../ConvertFrom-Csv.md | 37 +++++++++++++++++-- .../ConvertFrom-Csv.md | 34 ++++++++++++++++- 4 files changed, 132 insertions(+), 6 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 1cebd8e430b5..20df4fd57db3 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 11/29/2022 +ms.date: 11/18/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 @@ -147,6 +147,31 @@ When the **UseCulture** parameter is used, be sure that the current culture's de separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't generate objects from the CSV strings. +### Example 5: Convert CSV data in W3C Extended Log Format + +This example shows how to convert CSV data in W3C Extended Log Format to objects. + +```powershell +$logData = @" +#Version: 1.0 +#Fields: time,cs-method,cs-uri +00:34:23,GET,/foo/bar.html +12:21:16,GET,/foo/bar.html +12:45:52,GET,/foo/bar.html +12:57:34,GET,/foo/bar.html +"@ +ConvertFrom-Csv $logData +``` + +```Output +time cs-method cs-uri +---- --------- ------ +00:34:23 GET /foo/bar.html +12:21:16 GET /foo/bar.html +12:45:52 GET /foo/bar.html +12:57:34 GET /foo/bar.html +``` + ## PARAMETERS ### -Delimiter @@ -257,6 +282,12 @@ In CSV format, each object is represented by a character-separated list of the p the object. The property values are converted to strings, using the `ToString()` method of the object. There is no way to export the methods of the object. +`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character +(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains +comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the +standard format for Windows IIS and other web server logs. For more information, see [Extended Log +File Format](https://www.w3.org/TR/WD-logfile.html). + ## RELATED LINKS [ConvertTo-Csv](ConvertTo-Csv.md) diff --git a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 7d4f0f8c206d..6980ee05592c 100644 --- a/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 11/29/2022 +ms.date: 11/18/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 @@ -147,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't generate objects from the CSV strings. +### Example 5: Convert CSV data in W3C Extended Log Format + +This example shows how to convert CSV data in W3C Extended Log Format to objects. + +```powershell +$logData = @" +#Version: 1.0 +#Date: 12-Jan-1996 00:00:00 +#Fields: time,cs-method,cs-uri +00:34:23,GET,/foo/bar.html +12:21:16,GET,/foo/bar.html +12:45:52,GET,/foo/bar.html +12:57:34,GET,/foo/bar.html +"@ +ConvertFrom-Csv $logData +``` + +```Output +time cs-method cs-uri +---- --------- ------ +00:34:23 GET /foo/bar.html +12:21:16 GET /foo/bar.html +12:45:52 GET /foo/bar.html +12:57:34 GET /foo/bar.html +``` + ## PARAMETERS ### -Delimiter @@ -257,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p the object. The property values are converted to strings, using the `ToString()` method of the object. There is no way to export the methods of the object. +`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character +(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains +comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the +standard format for Windows IIS and other web server logs. For more information, see [Extended Log +File Format](https://www.w3.org/TR/WD-logfile.html). + ## RELATED LINKS [ConvertTo-Csv](ConvertTo-Csv.md) diff --git a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index fa7321a0d135..ad1d86c5b7d1 100644 --- a/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 11/29/2022 +ms.date: 11/18/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: ConvertFrom-Csv @@ -25,8 +25,7 @@ ConvertFrom-Csv [[-Delimiter] ] [-InputObject] [-Header [-Header ] - [] +ConvertFrom-Csv -UseCulture [-InputObject] [-Header ] [] ``` ## DESCRIPTION @@ -148,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't generate objects from the CSV strings. +### Example 5: Convert CSV data in W3C Extended Log Format + +This example shows how to convert CSV data in W3C Extended Log Format to objects. + +```powershell +$logData = @" +#Version: 1.0 +#Date: 12-Jan-1996 00:00:00 +#Fields: time,cs-method,cs-uri +00:34:23,GET,/foo/bar.html +12:21:16,GET,/foo/bar.html +12:45:52,GET,/foo/bar.html +12:57:34,GET,/foo/bar.html +"@ +ConvertFrom-Csv $logData +``` + +```Output +time cs-method cs-uri +---- --------- ------ +00:34:23 GET /foo/bar.html +12:21:16 GET /foo/bar.html +12:45:52 GET /foo/bar.html +12:57:34 GET /foo/bar.html +``` + ## PARAMETERS ### -Delimiter @@ -258,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p the object. The property values are converted to strings, using the `ToString()` method of the object. There is no way to export the methods of the object. +`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character +(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains +comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the +standard format for Windows IIS and other web server logs. For more information, see [Extended Log +File Format](https://www.w3.org/TR/WD-logfile.html). + ## RELATED LINKS [ConvertTo-Csv](ConvertTo-Csv.md) diff --git a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md index 62e8101d87c7..b8e0ee377713 100644 --- a/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md +++ b/reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md @@ -2,7 +2,7 @@ external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml Locale: en-US Module Name: Microsoft.PowerShell.Utility -ms.date: 11/29/2022 +ms.date: 11/18/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: ConvertFrom-Csv @@ -147,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't generate objects from the CSV strings. +### Example 5: Convert CSV data in W3C Extended Log Format + +This example shows how to convert CSV data in W3C Extended Log Format to objects. + +```powershell +$logData = @" +#Version: 1.0 +#Date: 12-Jan-1996 00:00:00 +#Fields: time,cs-method,cs-uri +00:34:23,GET,/foo/bar.html +12:21:16,GET,/foo/bar.html +12:45:52,GET,/foo/bar.html +12:57:34,GET,/foo/bar.html +"@ +ConvertFrom-Csv $logData +``` + +```Output +time cs-method cs-uri +---- --------- ------ +00:34:23 GET /foo/bar.html +12:21:16 GET /foo/bar.html +12:45:52 GET /foo/bar.html +12:57:34 GET /foo/bar.html +``` + ## PARAMETERS ### -Delimiter @@ -257,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p the object. The property values are converted to strings, using the `ToString()` method of the object. There is no way to export the methods of the object. +`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character +(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains +comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the +standard format for Windows IIS and other web server logs. For more information, see [Extended Log +File Format](https://www.w3.org/TR/WD-logfile.html). + ## RELATED LINKS [ConvertTo-Csv](ConvertTo-Csv.md) From 5edb95c87b6f722dc080902f3cab33390191da05 Mon Sep 17 00:00:00 2001 From: "Mike F. Robbins" <6719572+mikefrobbins@users.noreply.github.com> Date: Tue, 18 Nov 2025 16:42:35 -0600 Subject: [PATCH 2/2] Updated azps quick filter link for 15.0.0 (#12520) --- reference/module/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/module/index.md b/reference/module/index.md index 69705ac92111..be1a936e67db 100644 --- a/reference/module/index.md +++ b/reference/module/index.md @@ -12,7 +12,7 @@ ms.manager: sewhee ms.product: powershell ms.topic: landing-page quickFilterColumn1: powershell-7.4,windowsserver2025-ps -quickFilterColumn2: azps-14.6.0,sqlserver-ps +quickFilterColumn2: azps-15.0.0,sqlserver-ps quickFilterColumn3: graph-powershell-1.0,systemcenter-ps-2022 title: PowerShell Module Browser ---