Skip to content

Commit a5f21c5

Browse files
matt9ucciSean Wheeler
authored andcommitted
Fix the example of Format-Wide -ShowError (#1851)
1 parent 9799c2b commit a5f21c5

File tree

5 files changed

+37
-37
lines changed

5 files changed

+37
-37
lines changed

reference/3.0/Microsoft.PowerShell.Utility/Format-Wide.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,18 +208,18 @@ Accept wildcard characters: True
208208
```
209209

210210
### -ShowError
211-
Sends errors through the pipeline.
212-
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Wide command, and the expressions do not appear to be working.
213-
The following shows an example of the results of adding the ShowError parameter with an expression.
211+
Indicates that the cmdlet sends errors through the pipeline.
212+
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
213+
The following shows an example of the results of adding the **ShowError** parameter with an expression.
214+
215+
```powershell
216+
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError
214217
215-
PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
216-
DayOfWeek $_ / $null
217-
--------- ------------
218-
Wednesday
219218
220219
Failed to evaluate expression " $_ / $null ".
221-
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
220+
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
222221
+ FullyQualifiedErrorId : mshExpressionError
222+
```
223223

224224
```yaml
225225
Type: SwitchParameter

reference/4.0/Microsoft.PowerShell.Utility/Format-Wide.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -213,18 +213,18 @@ Accept wildcard characters: True
213213
```
214214

215215
### -ShowError
216-
Sends errors through the pipeline.
217-
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a Format-Wide command, and the expressions do not appear to be working.
218-
The following shows an example of the results of adding the ShowError parameter with an expression.
216+
Indicates that the cmdlet sends errors through the pipeline.
217+
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
218+
The following shows an example of the results of adding the **ShowError** parameter with an expression.
219+
220+
```powershell
221+
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError
219222
220-
PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
221-
DayOfWeek $_ / $null
222-
--------- ------------
223-
Wednesday
224223
225224
Failed to evaluate expression " $_ / $null ".
226-
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
225+
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
227226
+ FullyQualifiedErrorId : mshExpressionError
227+
```
228228

229229
```yaml
230230
Type: SwitchParameter

reference/5.0/Microsoft.PowerShell.Utility/Format-Wide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,17 @@ Accept wildcard characters: False
217217

218218
### -ShowError
219219
Indicates that the cmdlet sends errors through the pipeline.
220-
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
221-
The following shows an example of the results of adding the *ShowError* parameter with an expression.
220+
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
221+
The following shows an example of the results of adding the **ShowError** parameter with an expression.
222+
223+
```powershell
224+
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError
222225
223-
PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
224-
DayOfWeek $_ / $null
225-
--------- ------------
226-
Wednesday
227226
228227
Failed to evaluate expression " $_ / $null ".
229-
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
228+
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
230229
+ FullyQualifiedErrorId : mshExpressionError
230+
```
231231

232232
```yaml
233233
Type: SwitchParameter

reference/5.1/Microsoft.PowerShell.Utility/Format-Wide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -217,17 +217,17 @@ Accept wildcard characters: False
217217

218218
### -ShowError
219219
Indicates that the cmdlet sends errors through the pipeline.
220-
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
221-
The following shows an example of the results of adding the *ShowError* parameter with an expression.
220+
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
221+
The following shows an example of the results of adding the **ShowError** parameter with an expression.
222+
223+
```powershell
224+
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError
222225
223-
PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
224-
DayOfWeek $_ / $null
225-
--------- ------------
226-
Wednesday
227226
228227
Failed to evaluate expression " $_ / $null ".
229-
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
228+
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
230229
+ FullyQualifiedErrorId : mshExpressionError
230+
```
231231

232232
```yaml
233233
Type: SwitchParameter

reference/6/Microsoft.PowerShell.Utility/Format-Wide.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,17 @@ Accept wildcard characters: False
245245

246246
### -ShowError
247247
Indicates that the cmdlet sends errors through the pipeline.
248-
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a **Format-Wide** command, and the expressions do not appear to be working.
249-
The following shows an example of the results of adding the *ShowError* parameter with an expression.
248+
This parameter is rarely used, but can be used as a debugging aid when you are formatting expressions in a `Format-Wide` command, and the expressions do not appear to be working.
249+
The following shows an example of the results of adding the **ShowError** parameter with an expression.
250+
251+
```powershell
252+
PS C:\> Get-Date | Format-Wide { $_ / $null } -ShowError
250253
251-
PS \> Get-Date | Format-Wide DayOfWeek,{ $_ / $null } -ShowError
252-
DayOfWeek $_ / $null
253-
--------- ------------
254-
Wednesday
255254
256255
Failed to evaluate expression " $_ / $null ".
257-
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) \[\], RuntimeException
256+
+ CategoryInfo : InvalidArgument: (10/30/2013 2:28:07 PM:PSObject) [], RuntimeException
258257
+ FullyQualifiedErrorId : mshExpressionError
258+
```
259259

260260
```yaml
261261
Type: SwitchParameter

0 commit comments

Comments
 (0)