From 6413a24c24d43fa300b758b4777a3cb4e893266a Mon Sep 17 00:00:00 2001 From: Matt Gucci Date: Fri, 10 Nov 2017 22:14:23 +0900 Subject: [PATCH] Fix the example of `Format-Custom -DisplayError` The example is a -DisplayError parameter example. But it uses -ShowError parameter. --- .../Format-Custom.md | 21 ++++++++++++------- .../Format-Custom.md | 21 ++++++++++++------- .../Format-Custom.md | 16 ++++++++------ .../Format-Custom.md | 16 ++++++++------ .../Format-Custom.md | 16 ++++++++------ 5 files changed, 56 insertions(+), 34 deletions(-) diff --git a/reference/3.0/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/3.0/Microsoft.PowerShell.Utility/Format-Custom.md index 02dd4734a64e..a53370370c35 100644 --- a/reference/3.0/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/3.0/Microsoft.PowerShell.Utility/Format-Custom.md @@ -56,14 +56,19 @@ Accept wildcard characters: False ``` ### -DisplayError -Displays errors at the command line. -This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Custom command, and the expressions do not appear to be working. -The following shows an example of the results of adding the DisplayError parameter with an expression. - -PS \> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError -DayOfWeek $_ / $null ---------- ------------ -Wednesday #ERR +Indicates that this cmdlet displays errors at the command line. +This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Custom` command, and the expressions do not appear to be working. +The following shows an example of the results of adding the **DisplayError** parameter with an expression. + +```powershell +PS C:\> Get-Date | Format-Custom DayOfWeek, { $_ / $null } -DisplayError + +class DateTime +{ + DayOfWeek = Wednesday + $_ / $null = #ERR +} +``` ```yaml Type: SwitchParameter diff --git a/reference/4.0/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/4.0/Microsoft.PowerShell.Utility/Format-Custom.md index 479e88483c75..7740ff8de399 100644 --- a/reference/4.0/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/4.0/Microsoft.PowerShell.Utility/Format-Custom.md @@ -61,14 +61,19 @@ Accept wildcard characters: False ``` ### -DisplayError -Displays errors at the command line. -This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Custom command, and the expressions do not appear to be working. -The following shows an example of the results of adding the DisplayError parameter with an expression. - -PS \> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError -DayOfWeek $_ / $null ---------- ------------ -Wednesday #ERR +Indicates that this cmdlet displays errors at the command line. +This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Custom` command, and the expressions do not appear to be working. +The following shows an example of the results of adding the **DisplayError** parameter with an expression. + +```powershell +PS C:\> Get-Date | Format-Custom DayOfWeek, { $_ / $null } -DisplayError + +class DateTime +{ + DayOfWeek = Wednesday + $_ / $null = #ERR +} +``` ```yaml Type: SwitchParameter diff --git a/reference/5.0/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/5.0/Microsoft.PowerShell.Utility/Format-Custom.md index b98818c4ba00..5efba0338d12 100644 --- a/reference/5.0/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/5.0/Microsoft.PowerShell.Utility/Format-Custom.md @@ -62,14 +62,18 @@ Accept wildcard characters: False ### -DisplayError Indicates that this cmdlet displays errors at the command line. -This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Custom** command, and the expressions do not appear to be working. -The following shows an example of the results of adding the *DisplayError* parameter with an expression. +This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Custom` command, and the expressions do not appear to be working. +The following shows an example of the results of adding the **DisplayError** parameter with an expression. -`PS \> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError` +```powershell +PS C:\> Get-Date | Format-Custom DayOfWeek, { $_ / $null } -DisplayError -`DayOfWeek $_ / $null` -`--------- ------------` -`Wednesday #ERR` +class DateTime +{ + DayOfWeek = Wednesday + $_ / $null = #ERR +} +``` ```yaml Type: SwitchParameter diff --git a/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md index 4459468606ea..3c6f9f1e5c1c 100644 --- a/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/5.1/Microsoft.PowerShell.Utility/Format-Custom.md @@ -62,14 +62,18 @@ Accept wildcard characters: False ### -DisplayError Indicates that this cmdlet displays errors at the command line. -This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Custom** command, and the expressions do not appear to be working. -The following shows an example of the results of adding the *DisplayError* parameter with an expression. +This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Custom` command, and the expressions do not appear to be working. +The following shows an example of the results of adding the **DisplayError** parameter with an expression. -`PS \> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError` +```powershell +PS C:\> Get-Date | Format-Custom DayOfWeek, { $_ / $null } -DisplayError -`DayOfWeek $_ / $null` -`--------- ------------` -`Wednesday #ERR` +class DateTime +{ + DayOfWeek = Wednesday + $_ / $null = #ERR +} +``` ```yaml Type: SwitchParameter diff --git a/reference/6/Microsoft.PowerShell.Utility/Format-Custom.md b/reference/6/Microsoft.PowerShell.Utility/Format-Custom.md index 332b3f7cda9b..7ed2ab5b3d93 100644 --- a/reference/6/Microsoft.PowerShell.Utility/Format-Custom.md +++ b/reference/6/Microsoft.PowerShell.Utility/Format-Custom.md @@ -63,14 +63,18 @@ Accept wildcard characters: False ### -DisplayError Indicates that this cmdlet displays errors at the command line. -This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Custom** command, and the expressions do not appear to be working. -The following shows an example of the results of adding the *DisplayError* parameter with an expression. +This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Custom` command, and the expressions do not appear to be working. +The following shows an example of the results of adding the **DisplayError** parameter with an expression. -`PS \> Get-Date | Format-Custom DayOfWeek,{ $_ / $null } -ShowError` +```powershell +PS C:\> Get-Date | Format-Custom DayOfWeek, { $_ / $null } -DisplayError -`DayOfWeek $_ / $null` -`--------- ------------` -`Wednesday #ERR` +class DateTime +{ + DayOfWeek = Wednesday + $_ / $null = #ERR +} +``` ```yaml Type: SwitchParameter