Skip to content

Commit 69808ee

Browse files
Fix Test-Remainder invocation to pass three arguments, not two.
You state: "The following example declares a Value parameter that's mandatory and a Remaining parameter that accepts **all the remaining parameter values** that are submitted to the function. You want to demonstrate this with this invocation: `Test-Remainder first one, two` But your "all the remaining parameter values" is merely one value: `one, two` is an array. Thus, if you removed `ValueFromRemainingArguments`, the same invocation would yield the same output, so your example **does not** demonstrate the benefit of `ValueFromRemainingArguments`. To fix it, three args have to be passed to the Cmdlet, not just two.
1 parent 67c9a04 commit 69808ee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ function Test-Remainder {
591591
"${i}: $($Remaining[$i])"
592592
}
593593
}
594-
Test-Remainder first one, two
594+
Test-Remainder first one two
595595
```
596596

597597
```Output

0 commit comments

Comments
 (0)