From d82e62721f02ab71da590f04b1c47e7a733e39f0 Mon Sep 17 00:00:00 2001 From: Michael Lombardi Date: Thu, 26 Oct 2023 09:59:46 -0500 Subject: [PATCH] (GH-10580) Remove extraneous example code Prior to this change, the `about_Automatic_Variables` article included an unnecessary `Out-Null` in a loop example. Using `Out-Null` in this case implies that the `Reset()` method returns output, which it doesn't. This change: - Removes the unnecessary `Out-Null` from the example. - Resolves #10580 - Fixes AB#174090 --- .../About/about_Automatic_Variables.md | 4 ++-- .../About/about_Automatic_Variables.md | 4 ++-- .../About/about_Automatic_Variables.md | 4 ++-- .../About/about_Automatic_Variables.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md index 43ef5c54cf52..ea9a8ec3918c 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md @@ -1,7 +1,7 @@ --- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US -ms.date: 07/17/2023 +ms.date: 10/26/2023 no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -955,7 +955,7 @@ foreach ($num in ("one","two", "three")) if ($num -eq "two" -and $stopLoop -lt 2) { - $foreach.Reset() | Out-Null + $foreach.Reset() ("`t" * $stopLoop) + "Reset Loop: $stopLoop" $stopLoop++ } diff --git a/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md b/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md index 24a7cfe7fa6e..9944b5e6dc1b 100644 --- a/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md +++ b/reference/7.2/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md @@ -1,7 +1,7 @@ --- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US -ms.date: 07/17/2023 +ms.date: 10/26/2023 no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.2&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three")) if ($num -eq "two" -and $stopLoop -lt 2) { - $foreach.Reset() | Out-Null + $foreach.Reset() ("`t" * $stopLoop) + "Reset Loop: $stopLoop" $stopLoop++ } diff --git a/reference/7.3/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md b/reference/7.3/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md index bd18be5db0b2..ce10ddfc78ee 100644 --- a/reference/7.3/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md +++ b/reference/7.3/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md @@ -1,7 +1,7 @@ --- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US -ms.date: 07/17/2023 +ms.date: 10/26/2023 no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.3&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three")) if ($num -eq "two" -and $stopLoop -lt 2) { - $foreach.Reset() | Out-Null + $foreach.Reset() ("`t" * $stopLoop) + "Reset Loop: $stopLoop" $stopLoop++ } diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md index 48c5a972ecd1..c77e3eccaee5 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Automatic_Variables.md @@ -1,7 +1,7 @@ --- description: Describes variables that store state information for PowerShell. These variables are created and maintained by PowerShell. Locale: en-US -ms.date: 07/17/2023 +ms.date: 10/26/2023 no-loc: [Reset, Current, Background, Blink, Bold, Foreground, Formatting, Hidden, Italic, Reset, Reverse, Underline] online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_automatic_variables?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 @@ -995,7 +995,7 @@ foreach ($num in ("one","two", "three")) if ($num -eq "two" -and $stopLoop -lt 2) { - $foreach.Reset() | Out-Null + $foreach.Reset() ("`t" * $stopLoop) + "Reset Loop: $stopLoop" $stopLoop++ }