Skip to content

Commit 4795d2d

Browse files
Merge pull request #12521 from MicrosoftDocs/main
Auto Publish – main to live - 2025-11-18 23:00 UTC
2 parents f376cdb + 5edb95c commit 4795d2d

File tree

5 files changed

+133
-7
lines changed

5 files changed

+133
-7
lines changed

reference/5.1/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/29/2022
5+
ms.date: 11/18/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-5.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: ConvertFrom-Csv
@@ -147,6 +147,31 @@ When the **UseCulture** parameter is used, be sure that the current culture's de
147147
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
148148
generate objects from the CSV strings.
149149

150+
### Example 5: Convert CSV data in W3C Extended Log Format
151+
152+
This example shows how to convert CSV data in W3C Extended Log Format to objects.
153+
154+
```powershell
155+
$logData = @"
156+
#Version: 1.0
157+
#Fields: time,cs-method,cs-uri
158+
00:34:23,GET,/foo/bar.html
159+
12:21:16,GET,/foo/bar.html
160+
12:45:52,GET,/foo/bar.html
161+
12:57:34,GET,/foo/bar.html
162+
"@
163+
ConvertFrom-Csv $logData
164+
```
165+
166+
```Output
167+
time cs-method cs-uri
168+
---- --------- ------
169+
00:34:23 GET /foo/bar.html
170+
12:21:16 GET /foo/bar.html
171+
12:45:52 GET /foo/bar.html
172+
12:57:34 GET /foo/bar.html
173+
```
174+
150175
## PARAMETERS
151176

152177
### -Delimiter
@@ -257,6 +282,12 @@ In CSV format, each object is represented by a character-separated list of the p
257282
the object. The property values are converted to strings, using the `ToString()` method of the
258283
object. There is no way to export the methods of the object.
259284

285+
`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character
286+
(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains
287+
comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the
288+
standard format for Windows IIS and other web server logs. For more information, see [Extended Log
289+
File Format](https://www.w3.org/TR/WD-logfile.html).
290+
260291
## RELATED LINKS
261292

262293
[ConvertTo-Csv](ConvertTo-Csv.md)

reference/7.4/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/29/2022
5+
ms.date: 11/18/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.4&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: ConvertFrom-Csv
@@ -147,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de
147147
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
148148
generate objects from the CSV strings.
149149

150+
### Example 5: Convert CSV data in W3C Extended Log Format
151+
152+
This example shows how to convert CSV data in W3C Extended Log Format to objects.
153+
154+
```powershell
155+
$logData = @"
156+
#Version: 1.0
157+
#Date: 12-Jan-1996 00:00:00
158+
#Fields: time,cs-method,cs-uri
159+
00:34:23,GET,/foo/bar.html
160+
12:21:16,GET,/foo/bar.html
161+
12:45:52,GET,/foo/bar.html
162+
12:57:34,GET,/foo/bar.html
163+
"@
164+
ConvertFrom-Csv $logData
165+
```
166+
167+
```Output
168+
time cs-method cs-uri
169+
---- --------- ------
170+
00:34:23 GET /foo/bar.html
171+
12:21:16 GET /foo/bar.html
172+
12:45:52 GET /foo/bar.html
173+
12:57:34 GET /foo/bar.html
174+
```
175+
150176
## PARAMETERS
151177

152178
### -Delimiter
@@ -257,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p
257283
the object. The property values are converted to strings, using the `ToString()` method of the
258284
object. There is no way to export the methods of the object.
259285

286+
`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character
287+
(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains
288+
comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the
289+
standard format for Windows IIS and other web server logs. For more information, see [Extended Log
290+
File Format](https://www.w3.org/TR/WD-logfile.html).
291+
260292
## RELATED LINKS
261293

262294
[ConvertTo-Csv](ConvertTo-Csv.md)

reference/7.5/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/29/2022
5+
ms.date: 11/18/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.5&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: ConvertFrom-Csv
@@ -25,8 +25,7 @@ ConvertFrom-Csv [[-Delimiter] <Char>] [-InputObject] <PSObject[]> [-Header <Stri
2525
### UseCulture
2626

2727
```
28-
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>]
29-
[<CommonParameters>]
28+
ConvertFrom-Csv -UseCulture [-InputObject] <PSObject[]> [-Header <String[]>] [<CommonParameters>]
3029
```
3130

3231
## DESCRIPTION
@@ -148,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de
148147
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
149148
generate objects from the CSV strings.
150149

150+
### Example 5: Convert CSV data in W3C Extended Log Format
151+
152+
This example shows how to convert CSV data in W3C Extended Log Format to objects.
153+
154+
```powershell
155+
$logData = @"
156+
#Version: 1.0
157+
#Date: 12-Jan-1996 00:00:00
158+
#Fields: time,cs-method,cs-uri
159+
00:34:23,GET,/foo/bar.html
160+
12:21:16,GET,/foo/bar.html
161+
12:45:52,GET,/foo/bar.html
162+
12:57:34,GET,/foo/bar.html
163+
"@
164+
ConvertFrom-Csv $logData
165+
```
166+
167+
```Output
168+
time cs-method cs-uri
169+
---- --------- ------
170+
00:34:23 GET /foo/bar.html
171+
12:21:16 GET /foo/bar.html
172+
12:45:52 GET /foo/bar.html
173+
12:57:34 GET /foo/bar.html
174+
```
175+
151176
## PARAMETERS
152177

153178
### -Delimiter
@@ -258,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p
258283
the object. The property values are converted to strings, using the `ToString()` method of the
259284
object. There is no way to export the methods of the object.
260285

286+
`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character
287+
(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains
288+
comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the
289+
standard format for Windows IIS and other web server logs. For more information, see [Extended Log
290+
File Format](https://www.w3.org/TR/WD-logfile.html).
291+
261292
## RELATED LINKS
262293

263294
[ConvertTo-Csv](ConvertTo-Csv.md)

reference/7.6/Microsoft.PowerShell.Utility/ConvertFrom-Csv.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.PowerShell.Commands.Utility.dll-Help.xml
33
Locale: en-US
44
Module Name: Microsoft.PowerShell.Utility
5-
ms.date: 11/29/2022
5+
ms.date: 11/18/2025
66
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.utility/convertfrom-csv?view=powershell-7.6&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: ConvertFrom-Csv
@@ -147,6 +147,32 @@ When the **UseCulture** parameter is used, be sure that the current culture's de
147147
separator matches the delimiter used in the CSV strings. Otherwise, `ConvertFrom-Csv` can't
148148
generate objects from the CSV strings.
149149

150+
### Example 5: Convert CSV data in W3C Extended Log Format
151+
152+
This example shows how to convert CSV data in W3C Extended Log Format to objects.
153+
154+
```powershell
155+
$logData = @"
156+
#Version: 1.0
157+
#Date: 12-Jan-1996 00:00:00
158+
#Fields: time,cs-method,cs-uri
159+
00:34:23,GET,/foo/bar.html
160+
12:21:16,GET,/foo/bar.html
161+
12:45:52,GET,/foo/bar.html
162+
12:57:34,GET,/foo/bar.html
163+
"@
164+
ConvertFrom-Csv $logData
165+
```
166+
167+
```Output
168+
time cs-method cs-uri
169+
---- --------- ------
170+
00:34:23 GET /foo/bar.html
171+
12:21:16 GET /foo/bar.html
172+
12:45:52 GET /foo/bar.html
173+
12:57:34 GET /foo/bar.html
174+
```
175+
150176
## PARAMETERS
151177

152178
### -Delimiter
@@ -257,6 +283,12 @@ In CSV format, each object is represented by a character-separated list of the p
257283
the object. The property values are converted to strings, using the `ToString()` method of the
258284
object. There is no way to export the methods of the object.
259285

286+
`ConvertFrom-Csv` also supports the W3C Extended Log format. Lines starting with the hash character
287+
(`#`) are treated as comments and ignored unless the comment starts with `#Fields:` and contains
288+
comma-delimited list of column names. In that case, the cmdlet uses those column names. This is the
289+
standard format for Windows IIS and other web server logs. For more information, see [Extended Log
290+
File Format](https://www.w3.org/TR/WD-logfile.html).
291+
260292
## RELATED LINKS
261293

262294
[ConvertTo-Csv](ConvertTo-Csv.md)

reference/module/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.manager: sewhee
1212
ms.product: powershell
1313
ms.topic: landing-page
1414
quickFilterColumn1: powershell-7.4,windowsserver2025-ps
15-
quickFilterColumn2: azps-14.6.0,sqlserver-ps
15+
quickFilterColumn2: azps-15.0.0,sqlserver-ps
1616
quickFilterColumn3: graph-powershell-1.0,systemcenter-ps-2022
1717
title: PowerShell Module Browser
1818
---

0 commit comments

Comments
 (0)