Skip to content

Commit e794da1

Browse files
Merge pull request #12420 from MicrosoftDocs/main
Auto Publish – main to live - 2025-10-06 22:00 UTC
2 parents 74949b2 + 0a6b621 commit e794da1

File tree

4 files changed

+60
-48
lines changed

4 files changed

+60
-48
lines changed

reference/5.1/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes an attribute that reports the type of object that the function returns.
33
Locale: en-US
4-
ms.date: 04/14/2023
4+
ms.date: 10/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_OutputTypeAttribute
@@ -16,19 +16,22 @@ returns.
1616
## Long description
1717

1818
The **OutputType** attribute lists the .NET types of objects that the functions
19-
returns. You can use its optional ParameterSetName parameter to list different
20-
output types for each parameter set.
19+
returns. You can use its optional **ParameterSetName** parameter to list
20+
different output types for each parameter set.
2121

2222
The **OutputType** attribute is supported on simple and advanced functions.
23-
It's independent of the **CmdletBinding** attribute.
23+
It's independent of the **CmdletBinding** attribute. The **OutputType**
24+
attribute provides the value of the **OutputType** property of the
25+
**System.Management.Automation.FunctionInfo** object that the `Get-Command`
26+
cmdlet returns.
2427

25-
The **OutputType** attribute provides the value of the **OutputType** property
26-
of the **System.Management.Automation.FunctionInfo** object that the
27-
`Get-Command` cmdlet returns.
28+
> [!NOTE]
29+
> The **OutputType** attribute value isn't derived from the function code or
30+
> compared to the actual function output. As such, the value might be
31+
> inaccurate.
2832
29-
The **OutputType** attribute value is only a documentation note. It's not
30-
derived from the function code or compared to the actual function output. As
31-
such, the value might be inaccurate.
33+
The **OutputType** attribute also informs tab completion results for situations
34+
like: `Command | Select <Tab>` and `Command | Where <Tab>`.
3235

3336
## Syntax
3437

@@ -235,8 +238,8 @@ Or its shorter version.
235238
```
236239

237240
The value of the **OutputType** property can be null. Use a null value when the
238-
output isn't a .NET type, such as a **WMI** object or a formatted view of an
239-
object.
241+
function doesn't write any output to the **Success** stream. If the function
242+
writes output, but you don't know the type, use **System.Object**.
240243

241244
## See also
242245

reference/7.4/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes an attribute that reports the type of object that the function returns.
33
Locale: en-US
4-
ms.date: 04/14/2023
4+
ms.date: 10/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_OutputTypeAttribute
@@ -16,19 +16,22 @@ returns.
1616
## Long description
1717

1818
The **OutputType** attribute lists the .NET types of objects that the functions
19-
returns. You can use its optional ParameterSetName parameter to list different
20-
output types for each parameter set.
19+
returns. You can use its optional **ParameterSetName** parameter to list
20+
different output types for each parameter set.
2121

2222
The **OutputType** attribute is supported on simple and advanced functions.
23-
It's independent of the **CmdletBinding** attribute.
23+
It's independent of the **CmdletBinding** attribute. The **OutputType**
24+
attribute provides the value of the **OutputType** property of the
25+
**System.Management.Automation.FunctionInfo** object that the `Get-Command`
26+
cmdlet returns.
2427

25-
The **OutputType** attribute provides the value of the **OutputType** property
26-
of the **System.Management.Automation.FunctionInfo** object that the
27-
`Get-Command` cmdlet returns.
28+
> [!NOTE]
29+
> The **OutputType** attribute value isn't derived from the function code or
30+
> compared to the actual function output. As such, the value might be
31+
> inaccurate.
2832
29-
The **OutputType** attribute value is only a documentation note. It's not
30-
derived from the function code or compared to the actual function output. As
31-
such, the value might be inaccurate.
33+
The **OutputType** attribute also informs tab completion results for situations
34+
like: `Command | Select <Tab>` and `Command | Where <Tab>`.
3235

3336
## Syntax
3437

@@ -235,8 +238,8 @@ Or its shorter version.
235238
```
236239

237240
The value of the **OutputType** property can be null. Use a null value when the
238-
output isn't a .NET type, such as a **WMI** object or a formatted view of an
239-
object.
241+
function doesn't write any output to the **Success** stream. If the function
242+
writes output, but you don't know the type, use **System.Object**.
240243

241244
## See also
242245

reference/7.5/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes an attribute that reports the type of object that the function returns.
33
Locale: en-US
4-
ms.date: 04/14/2023
4+
ms.date: 10/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_OutputTypeAttribute
@@ -16,19 +16,22 @@ returns.
1616
## Long description
1717

1818
The **OutputType** attribute lists the .NET types of objects that the functions
19-
returns. You can use its optional ParameterSetName parameter to list different
20-
output types for each parameter set.
19+
returns. You can use its optional **ParameterSetName** parameter to list
20+
different output types for each parameter set.
2121

2222
The **OutputType** attribute is supported on simple and advanced functions.
23-
It's independent of the **CmdletBinding** attribute.
23+
It's independent of the **CmdletBinding** attribute. The **OutputType**
24+
attribute provides the value of the **OutputType** property of the
25+
**System.Management.Automation.FunctionInfo** object that the `Get-Command`
26+
cmdlet returns.
2427

25-
The **OutputType** attribute provides the value of the **OutputType** property
26-
of the **System.Management.Automation.FunctionInfo** object that the
27-
`Get-Command` cmdlet returns.
28+
> [!NOTE]
29+
> The **OutputType** attribute value isn't derived from the function code or
30+
> compared to the actual function output. As such, the value might be
31+
> inaccurate.
2832
29-
The **OutputType** attribute value is only a documentation note. It's not
30-
derived from the function code or compared to the actual function output. As
31-
such, the value might be inaccurate.
33+
The **OutputType** attribute also informs tab completion results for situations
34+
like: `Command | Select <Tab>` and `Command | Where <Tab>`.
3235

3336
## Syntax
3437

@@ -235,8 +238,8 @@ Or its shorter version.
235238
```
236239

237240
The value of the **OutputType** property can be null. Use a null value when the
238-
output isn't a .NET type, such as a **WMI** object or a formatted view of an
239-
object.
241+
function doesn't write any output to the **Success** stream. If the function
242+
writes output, but you don't know the type, use **System.Object**.
240243

241244
## See also
242245

reference/7.6/Microsoft.PowerShell.Core/About/about_Functions_OutputTypeAttribute.md

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes an attribute that reports the type of object that the function returns.
33
Locale: en-US
4-
ms.date: 04/14/2023
4+
ms.date: 10/06/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions_outputtypeattribute?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions_OutputTypeAttribute
@@ -16,19 +16,22 @@ returns.
1616
## Long description
1717

1818
The **OutputType** attribute lists the .NET types of objects that the functions
19-
returns. You can use its optional ParameterSetName parameter to list different
20-
output types for each parameter set.
19+
returns. You can use its optional **ParameterSetName** parameter to list
20+
different output types for each parameter set.
2121

2222
The **OutputType** attribute is supported on simple and advanced functions.
23-
It's independent of the **CmdletBinding** attribute.
23+
It's independent of the **CmdletBinding** attribute. The **OutputType**
24+
attribute provides the value of the **OutputType** property of the
25+
**System.Management.Automation.FunctionInfo** object that the `Get-Command`
26+
cmdlet returns.
2427

25-
The **OutputType** attribute provides the value of the **OutputType** property
26-
of the **System.Management.Automation.FunctionInfo** object that the
27-
`Get-Command` cmdlet returns.
28+
> [!NOTE]
29+
> The **OutputType** attribute value isn't derived from the function code or
30+
> compared to the actual function output. As such, the value might be
31+
> inaccurate.
2832
29-
The **OutputType** attribute value is only a documentation note. It's not
30-
derived from the function code or compared to the actual function output. As
31-
such, the value might be inaccurate.
33+
The **OutputType** attribute also informs tab completion results for situations
34+
like: `Command | Select <Tab>` and `Command | Where <Tab>`.
3235

3336
## Syntax
3437

@@ -235,8 +238,8 @@ Or its shorter version.
235238
```
236239

237240
The value of the **OutputType** property can be null. Use a null value when the
238-
output isn't a .NET type, such as a **WMI** object or a formatted view of an
239-
object.
241+
function doesn't write any output to the **Success** stream. If the function
242+
writes output, but you don't know the type, use **System.Object**.
240243

241244
## See also
242245

0 commit comments

Comments
 (0)