From aedf063d823b2337a541314f6a77f8fa0664447f Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 24 Sep 2025 14:09:23 -0500 Subject: [PATCH 1/4] Upcase H2 headers --- .../About/about_Environment_Variables.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index 93286cd1f36..ca8de9debe7 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -25,6 +25,8 @@ programs. PowerShell creates the following environment variables: For full descriptions of these variables, see the [PowerShell environment variables][03] of this article. +## LONG DESCRIPTION + PowerShell can access and manage environment variables in any of the supported operating system platforms. The PowerShell Environment provider lets you get, add, change, clear, and delete environment variables in the current console. From dde700f9c8da76bc95cb6eeb05657aecdc48cc5e Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Wed, 24 Sep 2025 14:29:10 -0500 Subject: [PATCH 2/4] Fix structure of About files --- .../About/about_Environment_Variables.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md index ca8de9debe7..93286cd1f36 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Environment_Variables.md @@ -25,8 +25,6 @@ programs. PowerShell creates the following environment variables: For full descriptions of these variables, see the [PowerShell environment variables][03] of this article. -## LONG DESCRIPTION - PowerShell can access and manage environment variables in any of the supported operating system platforms. The PowerShell Environment provider lets you get, add, change, clear, and delete environment variables in the current console. From 96bb595ed9aeeb0771feea03821f76d8acd00b1a Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Mon, 6 Oct 2025 08:27:11 -0500 Subject: [PATCH 3/4] Update outputtype recommendations --- .../about_Functions_OutputTypeAttribute.md | 27 ++++++++++--------- .../about_Functions_OutputTypeAttribute.md | 27 ++++++++++--------- .../about_Functions_OutputTypeAttribute.md | 27 ++++++++++--------- .../about_Functions_OutputTypeAttribute.md | 27 ++++++++++--------- 4 files changed, 60 insertions(+), 48 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 4a0e17460dc..533b32a8275 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -1,7 +1,7 @@ --- description: Describes an attribute that reports the type of object that the function returns. Locale: en-US -ms.date: 04/14/2023 +ms.date: 10/06/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-5.1&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_OutputTypeAttribute @@ -16,19 +16,22 @@ returns. ## Long description The **OutputType** attribute lists the .NET types of objects that the functions -returns. You can use its optional ParameterSetName parameter to list different -output types for each parameter set. +returns. You can use its optional **ParameterSetName** parameter to list +different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute. +It's independent of the **CmdletBinding** attribute.The **OutputType** +attribute provides the value of the **OutputType** property of the +**System.Management.Automation.FunctionInfo** object that the `Get-Command` +cmdlet returns. -The **OutputType** attribute provides the value of the **OutputType** property -of the **System.Management.Automation.FunctionInfo** object that the -`Get-Command` cmdlet returns. +> [!NOTE] +> The **OutputType** attribute value isn't derived from the function code or +> compared to the actual function output. As such, the value might be +> inaccurate. -The **OutputType** attribute value is only a documentation note. It's not -derived from the function code or compared to the actual function output. As -such, the value might be inaccurate. +The **OutputType** attribute also informs tab completion results for situations +like: `Command | Select ` and `Command | Where `. ## Syntax @@ -235,8 +238,8 @@ Or its shorter version. ``` The value of the **OutputType** property can be null. Use a null value when the -output isn't a .NET type, such as a **WMI** object or a formatted view of an -object. +function doesn't write any output to the **Success** stream. If the function +writes output, but you don't know the type, use **System.Object**. ## See also diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 18ac6aa3f52..a6e31aeddb1 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -1,7 +1,7 @@ --- description: Describes an attribute that reports the type of object that the function returns. Locale: en-US -ms.date: 04/14/2023 +ms.date: 10/06/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.4&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_OutputTypeAttribute @@ -16,19 +16,22 @@ returns. ## Long description The **OutputType** attribute lists the .NET types of objects that the functions -returns. You can use its optional ParameterSetName parameter to list different -output types for each parameter set. +returns. You can use its optional **ParameterSetName** parameter to list +different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute. +It's independent of the **CmdletBinding** attribute.The **OutputType** +attribute provides the value of the **OutputType** property of the +**System.Management.Automation.FunctionInfo** object that the `Get-Command` +cmdlet returns. -The **OutputType** attribute provides the value of the **OutputType** property -of the **System.Management.Automation.FunctionInfo** object that the -`Get-Command` cmdlet returns. +> [!NOTE] +> The **OutputType** attribute value isn't derived from the function code or +> compared to the actual function output. As such, the value might be +> inaccurate. -The **OutputType** attribute value is only a documentation note. It's not -derived from the function code or compared to the actual function output. As -such, the value might be inaccurate. +The **OutputType** attribute also informs tab completion results for situations +like: `Command | Select ` and `Command | Where `. ## Syntax @@ -235,8 +238,8 @@ Or its shorter version. ``` The value of the **OutputType** property can be null. Use a null value when the -output isn't a .NET type, such as a **WMI** object or a formatted view of an -object. +function doesn't write any output to the **Success** stream. If the function +writes output, but you don't know the type, use **System.Object**. ## See also diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index ce05abfb1b4..439db2f30ed 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -1,7 +1,7 @@ --- description: Describes an attribute that reports the type of object that the function returns. Locale: en-US -ms.date: 04/14/2023 +ms.date: 10/06/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.5&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_OutputTypeAttribute @@ -16,19 +16,22 @@ returns. ## Long description The **OutputType** attribute lists the .NET types of objects that the functions -returns. You can use its optional ParameterSetName parameter to list different -output types for each parameter set. +returns. You can use its optional **ParameterSetName** parameter to list +different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute. +It's independent of the **CmdletBinding** attribute.The **OutputType** +attribute provides the value of the **OutputType** property of the +**System.Management.Automation.FunctionInfo** object that the `Get-Command` +cmdlet returns. -The **OutputType** attribute provides the value of the **OutputType** property -of the **System.Management.Automation.FunctionInfo** object that the -`Get-Command` cmdlet returns. +> [!NOTE] +> The **OutputType** attribute value isn't derived from the function code or +> compared to the actual function output. As such, the value might be +> inaccurate. -The **OutputType** attribute value is only a documentation note. It's not -derived from the function code or compared to the actual function output. As -such, the value might be inaccurate. +The **OutputType** attribute also informs tab completion results for situations +like: `Command | Select ` and `Command | Where `. ## Syntax @@ -235,8 +238,8 @@ Or its shorter version. ``` The value of the **OutputType** property can be null. Use a null value when the -output isn't a .NET type, such as a **WMI** object or a formatted view of an -object. +function doesn't write any output to the **Success** stream. If the function +writes output, but you don't know the type, use **System.Object**. ## See also diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 66d9610a0a8..02ad0c4deca 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -1,7 +1,7 @@ --- description: Describes an attribute that reports the type of object that the function returns. Locale: en-US -ms.date: 04/14/2023 +ms.date: 10/06/2025 online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.6&WT.mc_id=ps-gethelp schema: 2.0.0 title: about_Functions_OutputTypeAttribute @@ -16,19 +16,22 @@ returns. ## Long description The **OutputType** attribute lists the .NET types of objects that the functions -returns. You can use its optional ParameterSetName parameter to list different -output types for each parameter set. +returns. You can use its optional **ParameterSetName** parameter to list +different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute. +It's independent of the **CmdletBinding** attribute.The **OutputType** +attribute provides the value of the **OutputType** property of the +**System.Management.Automation.FunctionInfo** object that the `Get-Command` +cmdlet returns. -The **OutputType** attribute provides the value of the **OutputType** property -of the **System.Management.Automation.FunctionInfo** object that the -`Get-Command` cmdlet returns. +> [!NOTE] +> The **OutputType** attribute value isn't derived from the function code or +> compared to the actual function output. As such, the value might be +> inaccurate. -The **OutputType** attribute value is only a documentation note. It's not -derived from the function code or compared to the actual function output. As -such, the value might be inaccurate. +The **OutputType** attribute also informs tab completion results for situations +like: `Command | Select ` and `Command | Where `. ## Syntax @@ -235,8 +238,8 @@ Or its shorter version. ``` The value of the **OutputType** property can be null. Use a null value when the -output isn't a .NET type, such as a **WMI** object or a formatted view of an -object. +function doesn't write any output to the **Success** stream. If the function +writes output, but you don't know the type, use **System.Object**. ## See also From 39048984fc15af25a1087abc2e355557e9860e71 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Mon, 6 Oct 2025 08:40:13 -0500 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Mikey Lombardi (He/Him) --- .../About/about_Functions_OutputTypeAttribute.md | 2 +- .../About/about_Functions_OutputTypeAttribute.md | 2 +- .../About/about_Functions_OutputTypeAttribute.md | 2 +- .../About/about_Functions_OutputTypeAttribute.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 533b32a8275..8721c841f2b 100644 --- a/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -20,7 +20,7 @@ returns. You can use its optional **ParameterSetName** parameter to list different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute.The **OutputType** +It's independent of the **CmdletBinding** attribute. The **OutputType** attribute provides the value of the **OutputType** property of the **System.Management.Automation.FunctionInfo** object that the `Get-Command` cmdlet returns. diff --git a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index a6e31aeddb1..d2727eb6110 100644 --- a/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -20,7 +20,7 @@ returns. You can use its optional **ParameterSetName** parameter to list different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute.The **OutputType** +It's independent of the **CmdletBinding** attribute. The **OutputType** attribute provides the value of the **OutputType** property of the **System.Management.Automation.FunctionInfo** object that the `Get-Command` cmdlet returns. diff --git a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 439db2f30ed..838aa61ac74 100644 --- a/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -20,7 +20,7 @@ returns. You can use its optional **ParameterSetName** parameter to list different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute.The **OutputType** +It's independent of the **CmdletBinding** attribute. The **OutputType** attribute provides the value of the **OutputType** property of the **System.Management.Automation.FunctionInfo** object that the `Get-Command` cmdlet returns. diff --git a/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md b/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md index 02ad0c4deca..1f4bf773529 100644 --- a/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md +++ b/reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md @@ -20,7 +20,7 @@ returns. You can use its optional **ParameterSetName** parameter to list different output types for each parameter set. The **OutputType** attribute is supported on simple and advanced functions. -It's independent of the **CmdletBinding** attribute.The **OutputType** +It's independent of the **CmdletBinding** attribute. The **OutputType** attribute provides the value of the **OutputType** property of the **System.Management.Automation.FunctionInfo** object that the `Get-Command` cmdlet returns.