Skip to content

Commit 0956bdb

Browse files
Merge pull request #12231 from MicrosoftDocs/main
Auto Publish – main to live - 2025-07-17 22:00 UTC
2 parents df4a224 + d072917 commit 0956bdb

File tree

10 files changed

+117
-48
lines changed

10 files changed

+117
-48
lines changed

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to create and use functions in PowerShell.
33
Locale: en-US
4-
ms.date: 04/17/2025
4+
ms.date: 07/16/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-5.1&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions
@@ -509,22 +509,33 @@ function Get-SumOfNumbers {
509509
begin { $retValue = 0 }
510510
511511
process {
512-
if ($null -ne $Numbers) {
512+
if ($MyInvocation.ExpectingInput) {
513+
"Pipeline input: $_"
514+
$retValue += $_
515+
} else {
513516
foreach ($n in $Numbers) {
517+
"Command line input: $n"
514518
$retValue += $n
515519
}
516-
} else {
517-
$retValue += $_
518520
}
519521
}
520522
521-
end { $retValue }
523+
end { "Sum = $retValue" }
522524
}
523525
524-
PS> 1, 2, 3, 4 | Get-SumOfNumbers
525-
10
526-
PS> Get-SumOfNumbers 1, 2, 3, 4
527-
10
526+
527+
PS> 1,2,3,4 | Get-SumOfNumbers
528+
Pipeline input: 1
529+
Pipeline input: 2
530+
Pipeline input: 3
531+
Pipeline input: 4
532+
Sum = 10
533+
PS> Get-SumOfNumbers 1,2,3,4
534+
Command line input: 1
535+
Command line input: 2
536+
Command line input: 3
537+
Command line input: 4
538+
Sum = 10
528539
```
529540

530541
When you use a function in a pipeline, the objects piped to the function are

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ PS> $i
194194
In the prefix case, the value of `$i` is incremented before being output. In
195195
the postfix case, the value of `$i` is incremented after being output.
196196

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

200200
```powershell

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to create and use functions in PowerShell.
33
Locale: en-US
4-
ms.date: 04/17/2025
4+
ms.date: 07/16/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.4&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions
@@ -533,22 +533,33 @@ function Get-SumOfNumbers {
533533
begin { $retValue = 0 }
534534
535535
process {
536-
if ($null -ne $Numbers) {
536+
if ($MyInvocation.ExpectingInput) {
537+
"Pipeline input: $_"
538+
$retValue += $_
539+
} else {
537540
foreach ($n in $Numbers) {
541+
"Command line input: $n"
538542
$retValue += $n
539543
}
540-
} else {
541-
$retValue += $_
542544
}
543545
}
544546
545-
end { $retValue }
547+
end { "Sum = $retValue" }
546548
}
547549
548-
PS> 1, 2, 3, 4 | Get-SumOfNumbers
549-
10
550-
PS> Get-SumOfNumbers 1, 2, 3, 4
551-
10
550+
551+
PS> 1,2,3,4 | Get-SumOfNumbers
552+
Pipeline input: 1
553+
Pipeline input: 2
554+
Pipeline input: 3
555+
Pipeline input: 4
556+
Sum = 10
557+
PS> Get-SumOfNumbers 1,2,3,4
558+
Command line input: 1
559+
Command line input: 2
560+
Command line input: 3
561+
Command line input: 4
562+
Sum = 10
552563
```
553564

554565
When you use a function in a pipeline, the objects piped to the function are

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PS> $i
171171
In the prefix case, the value of `$i` is incremented before being output. In
172172
the postfix case, the value of `$i` is incremented after being output.
173173

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

177177
```powershell

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to create and use functions in PowerShell.
33
Locale: en-US
4-
ms.date: 04/17/2025
4+
ms.date: 07/16/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.5&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions
@@ -533,22 +533,33 @@ function Get-SumOfNumbers {
533533
begin { $retValue = 0 }
534534
535535
process {
536-
if ($null -ne $Numbers) {
536+
if ($MyInvocation.ExpectingInput) {
537+
"Pipeline input: $_"
538+
$retValue += $_
539+
} else {
537540
foreach ($n in $Numbers) {
541+
"Command line input: $n"
538542
$retValue += $n
539543
}
540-
} else {
541-
$retValue += $_
542544
}
543545
}
544546
545-
end { $retValue }
547+
end { "Sum = $retValue" }
546548
}
547549
548-
PS> 1, 2, 3, 4 | Get-SumOfNumbers
549-
10
550-
PS> Get-SumOfNumbers 1, 2, 3, 4
551-
10
550+
551+
PS> 1,2,3,4 | Get-SumOfNumbers
552+
Pipeline input: 1
553+
Pipeline input: 2
554+
Pipeline input: 3
555+
Pipeline input: 4
556+
Sum = 10
557+
PS> Get-SumOfNumbers 1,2,3,4
558+
Command line input: 1
559+
Command line input: 2
560+
Command line input: 3
561+
Command line input: 4
562+
Sum = 10
552563
```
553564

554565
When you use a function in a pipeline, the objects piped to the function are

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PS> $i
171171
In the prefix case, the value of `$i` is incremented before being output. In
172172
the postfix case, the value of `$i` is incremented after being output.
173173

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

177177
```powershell

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

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: Describes how to create and use functions in PowerShell.
33
Locale: en-US
4-
ms.date: 04/17/2025
4+
ms.date: 07/16/2025
55
online version: https://learn.microsoft.com/powershell/module/microsoft.powershell.core/about/about_functions?view=powershell-7.6&WT.mc_id=ps-gethelp
66
schema: 2.0.0
77
title: about_Functions
@@ -533,22 +533,33 @@ function Get-SumOfNumbers {
533533
begin { $retValue = 0 }
534534
535535
process {
536-
if ($null -ne $Numbers) {
536+
if ($MyInvocation.ExpectingInput) {
537+
"Pipeline input: $_"
538+
$retValue += $_
539+
} else {
537540
foreach ($n in $Numbers) {
541+
"Command line input: $n"
538542
$retValue += $n
539543
}
540-
} else {
541-
$retValue += $_
542544
}
543545
}
544546
545-
end { $retValue }
547+
end { "Sum = $retValue" }
546548
}
547549
548-
PS> 1, 2, 3, 4 | Get-SumOfNumbers
549-
10
550-
PS> Get-SumOfNumbers 1, 2, 3, 4
551-
10
550+
551+
PS> 1,2,3,4 | Get-SumOfNumbers
552+
Pipeline input: 1
553+
Pipeline input: 2
554+
Pipeline input: 3
555+
Pipeline input: 4
556+
Sum = 10
557+
PS> Get-SumOfNumbers 1,2,3,4
558+
Command line input: 1
559+
Command line input: 2
560+
Command line input: 3
561+
Command line input: 4
562+
Sum = 10
552563
```
553564

554565
When you use a function in a pipeline, the objects piped to the function are

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ PS> $i
171171
In the prefix case, the value of `$i` is incremented before being output. In
172172
the postfix case, the value of `$i` is incremented after being output.
173173

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

177177
```powershell

reference/docs-conceptual/community/2025-updates.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: List of changes to the PowerShell documentation for 2025
3-
ms.date: 06/02/2025
3+
ms.date: 07/17/2025
44
title: What's New in PowerShell-Docs for 2025
55
---
66
# What's new in PowerShell Docs for 2025
@@ -14,6 +14,31 @@ get started.
1414
<!-- Link references -->
1515
[01]: contributing/overview.md
1616

17+
## 2025-June
18+
19+
No new content this month. Only minor edits and bug fixes.
20+
21+
GitHub stats
22+
23+
- 18 PRs merged (5 from Community)
24+
- 22 issues opened (22 from Community)
25+
- 22 issues closed (22 Community issues closed)
26+
27+
Top Community Contributors
28+
29+
The following people contributed to PowerShell docs this month by submitting pull requests or
30+
filing issues. Thank you!
31+
32+
| GitHub Id | PRs merged | Issues opened |
33+
| ----------- | :--------: | :-----------: |
34+
| skycommand | 2 | |
35+
| JustinGrote | 1 | |
36+
| OranguTech | 1 | |
37+
| changeworld | 1 | |
38+
| ThomasNieto | 1 | |
39+
| SamErde | 1 | |
40+
| vlad1300 | | 2 |
41+
1742
## 2025-May
1843

1944
Content updates

reference/docs-conceptual/community/hall-of-fame.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
description: List of the GitHub users that have the most contributions to the PowerShell-Doc project.
3-
ms.date: 06/02/2025
3+
ms.date: 07/17/2025
44
title: Community contributor Hall of Fame
55
---
66
# Community Contributor Hall of Fame
@@ -17,7 +17,7 @@ Pull Requests help us fix those issues and make the documentation better for eve
1717

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

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

0 commit comments

Comments
 (0)