Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use functions in PowerShell.
Locale: en-US
ms.date: 04/17/2025
ms.date: 07/16/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-5.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Functions
Expand Down Expand Up @@ -509,22 +509,33 @@ function Get-SumOfNumbers {
begin { $retValue = 0 }

process {
if ($null -ne $Numbers) {
if ($MyInvocation.ExpectingInput) {
"Pipeline input: $_"
$retValue += $_
} else {
foreach ($n in $Numbers) {
"Command line input: $n"
$retValue += $n
}
} else {
$retValue += $_
}
}

end { $retValue }
end { "Sum = $retValue" }
}

PS> 1, 2, 3, 4 | Get-SumOfNumbers
10
PS> Get-SumOfNumbers 1, 2, 3, 4
10

PS> 1,2,3,4 | Get-SumOfNumbers
Pipeline input: 1
Pipeline input: 2
Pipeline input: 3
Pipeline input: 4
Sum = 10
PS> Get-SumOfNumbers 1,2,3,4
Command line input: 1
Command line input: 2
Command line input: 3
Command line input: 4
Sum = 10
```

When you use a function in a pipeline, the objects piped to the function are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ PS> $i
In the prefix case, the value of `$i` is incremented before being output. In
the postfix case, the value of `$i` is incremented after being output.

You can also use this technique In the context of a conditional statement, such
You can also use this technique in the context of a conditional statement, such
as the `if` statement.

```powershell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use functions in PowerShell.
Locale: en-US
ms.date: 04/17/2025
ms.date: 07/16/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.4&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Functions
Expand Down Expand Up @@ -533,22 +533,33 @@ function Get-SumOfNumbers {
begin { $retValue = 0 }

process {
if ($null -ne $Numbers) {
if ($MyInvocation.ExpectingInput) {
"Pipeline input: $_"
$retValue += $_
} else {
foreach ($n in $Numbers) {
"Command line input: $n"
$retValue += $n
}
} else {
$retValue += $_
}
}

end { $retValue }
end { "Sum = $retValue" }
}

PS> 1, 2, 3, 4 | Get-SumOfNumbers
10
PS> Get-SumOfNumbers 1, 2, 3, 4
10

PS> 1,2,3,4 | Get-SumOfNumbers
Pipeline input: 1
Pipeline input: 2
Pipeline input: 3
Pipeline input: 4
Sum = 10
PS> Get-SumOfNumbers 1,2,3,4
Command line input: 1
Command line input: 2
Command line input: 3
Command line input: 4
Sum = 10
```

When you use a function in a pipeline, the objects piped to the function are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ PS> $i
In the prefix case, the value of `$i` is incremented before being output. In
the postfix case, the value of `$i` is incremented after being output.

You can also use this technique In the context of a conditional statement, such
You can also use this technique in the context of a conditional statement, such
as the `if` statement.

```powershell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use functions in PowerShell.
Locale: en-US
ms.date: 04/17/2025
ms.date: 07/16/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.5&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Functions
Expand Down Expand Up @@ -533,22 +533,33 @@ function Get-SumOfNumbers {
begin { $retValue = 0 }

process {
if ($null -ne $Numbers) {
if ($MyInvocation.ExpectingInput) {
"Pipeline input: $_"
$retValue += $_
} else {
foreach ($n in $Numbers) {
"Command line input: $n"
$retValue += $n
}
} else {
$retValue += $_
}
}

end { $retValue }
end { "Sum = $retValue" }
}

PS> 1, 2, 3, 4 | Get-SumOfNumbers
10
PS> Get-SumOfNumbers 1, 2, 3, 4
10

PS> 1,2,3,4 | Get-SumOfNumbers
Pipeline input: 1
Pipeline input: 2
Pipeline input: 3
Pipeline input: 4
Sum = 10
PS> Get-SumOfNumbers 1,2,3,4
Command line input: 1
Command line input: 2
Command line input: 3
Command line input: 4
Sum = 10
```

When you use a function in a pipeline, the objects piped to the function are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ PS> $i
In the prefix case, the value of `$i` is incremented before being output. In
the postfix case, the value of `$i` is incremented after being output.

You can also use this technique In the context of a conditional statement, such
You can also use this technique in the context of a conditional statement, such
as the `if` statement.

```powershell
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
description: Describes how to create and use functions in PowerShell.
Locale: en-US
ms.date: 04/17/2025
ms.date: 07/16/2025
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.6&WT.mc_id=ps-gethelp
schema: 2.0.0
title: about_Functions
Expand Down Expand Up @@ -533,22 +533,33 @@ function Get-SumOfNumbers {
begin { $retValue = 0 }

process {
if ($null -ne $Numbers) {
if ($MyInvocation.ExpectingInput) {
"Pipeline input: $_"
$retValue += $_
} else {
foreach ($n in $Numbers) {
"Command line input: $n"
$retValue += $n
}
} else {
$retValue += $_
}
}

end { $retValue }
end { "Sum = $retValue" }
}

PS> 1, 2, 3, 4 | Get-SumOfNumbers
10
PS> Get-SumOfNumbers 1, 2, 3, 4
10

PS> 1,2,3,4 | Get-SumOfNumbers
Pipeline input: 1
Pipeline input: 2
Pipeline input: 3
Pipeline input: 4
Sum = 10
PS> Get-SumOfNumbers 1,2,3,4
Command line input: 1
Command line input: 2
Command line input: 3
Command line input: 4
Sum = 10
```

When you use a function in a pipeline, the objects piped to the function are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ PS> $i
In the prefix case, the value of `$i` is incremented before being output. In
the postfix case, the value of `$i` is incremented after being output.

You can also use this technique In the context of a conditional statement, such
You can also use this technique in the context of a conditional statement, such
as the `if` statement.

```powershell
Expand Down
27 changes: 26 additions & 1 deletion reference/docs-conceptual/community/2025-updates.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: List of changes to the PowerShell documentation for 2025
ms.date: 06/02/2025
ms.date: 07/17/2025
title: What's New in PowerShell-Docs for 2025
---
# What's new in PowerShell Docs for 2025
Expand All @@ -14,6 +14,31 @@ get started.
<!-- Link references -->
[01]: contributing/overview.md

## 2025-June

No new content this month. Only minor edits and bug fixes.

GitHub stats

- 18 PRs merged (5 from Community)
- 22 issues opened (22 from Community)
- 22 issues closed (22 Community issues closed)

Top Community Contributors

The following people contributed to PowerShell docs this month by submitting pull requests or
filing issues. Thank you!

| GitHub Id | PRs merged | Issues opened |
| ----------- | :--------: | :-----------: |
| skycommand | 2 | |
| JustinGrote | 1 | |
| OranguTech | 1 | |
| changeworld | 1 | |
| ThomasNieto | 1 | |
| SamErde | 1 | |
| vlad1300 | | 2 |

## 2025-May

Content updates
Expand Down
14 changes: 7 additions & 7 deletions reference/docs-conceptual/community/hall-of-fame.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
description: List of the GitHub users that have the most contributions to the PowerShell-Doc project.
ms.date: 06/02/2025
ms.date: 07/17/2025
title: Community contributor Hall of Fame
---
# Community Contributor Hall of Fame
Expand All @@ -17,7 +17,7 @@ Pull Requests help us fix those issues and make the documentation better for eve

| PRs Merged | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | Grand Total |
| ------------------ | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ----------: |
| Community | 3 | 194 | 446 | 467 | 321 | 160 | 99 | 122 | 108 | 81 | 115 | 2116 |
| Community | 3 | 194 | 446 | 467 | 321 | 160 | 99 | 121 | 108 | 81 | 120 | 2120 |
| matt9ucci | | | 157 | 80 | 30 | 1 | 6 | | | | | 274 |
| nschonni | | | | 14 | 138 | 10 | | | | | | 162 |
| kiazhi | | 25 | 79 | 12 | | | | | | | | 116 |
Expand All @@ -28,9 +28,9 @@ Pull Requests help us fix those issues and make the documentation better for eve
| ehmiiz | | | | | | | | 22 | 14 | | | 36 |
| ArieHein | | | | | 1 | | | | | 7 | 25 | 33 |
| yecril71pl | | | | | | 21 | 3 | 3 | | | | 27 |
| skycommand | | | 1 | 3 | 3 | 6 | | 1 | 4 | 1 | 2 | 21 |
| changeworld | | | | | | | | 3 | | | 17 | 20 |
| Dan1el42 | | 20 | | | | | | | | | | 20 |
| changeworld | | | | | | | | 3 | | | 16 | 19 |
| skycommand | | | 1 | 3 | 3 | 6 | | 1 | 4 | 1 | | 19 |
| NReilingh | | 2 | | 13 | 3 | | | | | | | 18 |
| it-praktyk | | | | 16 | 1 | | | | | | | 17 |
| vors | | 15 | 1 | | | | | | | | | 16 |
Expand All @@ -48,7 +48,7 @@ GitHub issues help us identify errors and gaps in our documentation.

| Issues Opened | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | Grand Total |
| ------------------ | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ----------: |
| Community | 3 | 54 | 95 | 211 | 562 | 557 | 363 | 225 | 270 | 221 | 86 | 2647 |
| Community | 3 | 54 | 95 | 211 | 562 | 557 | 363 | 225 | 270 | 220 | 95 | 2655 |
| mklement0 | | | 19 | 60 | 56 | 61 | 28 | 8 | 20 | 24 | 2 | 278 |
| ehmiiz | | | | | | | | 20 | 14 | | | 34 |
| iSazonov | | | 1 | 4 | 10 | 8 | 4 | 3 | | 1 | | 31 |
Expand All @@ -70,8 +70,8 @@ GitHub issues help us identify errors and gaps in our documentation.
| jsilverm | | | | | | 8 | | | 4 | | | 12 |
| CarloToso | | | | | | | | | 11 | | | 11 |
| Liturgist | | | | | 1 | 1 | 1 | 2 | 4 | 2 | | 11 |
| vors | 1 | 6 | 2 | 1 | | | | | | | | 10 |
| ArmaanMcleod | | | | | | | | | 4 | 6 | | 10 |
| vors | 1 | 6 | 2 | 1 | | | | | | | | 10 |
| UberKluger | | | | | | 1 | 7 | 2 | | | | 10 |
| LaurentDardenne | | | 3 | 2 | | | | 5 | | | | 10 |
| matt9ucci | | | 2 | 5 | | | 2 | | 1 | | | 10 |
| LaurentDardenne | | | 3 | 2 | | | | 5 | | | | 10 |
Loading