File tree Expand file tree Collapse file tree 1 file changed +15
-15
lines changed
Expand file tree Collapse file tree 1 file changed +15
-15
lines changed Original file line number Diff line number Diff line change 11Function Test-PSBoundParameters {
2- <#
2+ <#
33 . SYNOPSIS
44 Describe the function here
55
@@ -13,24 +13,24 @@ Function Test-PSBoundParameters {
1313 [CmdletBinding ()]
1414
1515 param (
16- [string ]$Text ,
17- [int ]$Number
18- )
16+ [string ]$Text ,
17+ [int ]$Number
18+ )
1919
20- # Display all the passed parameters:
21- $PSBoundParameters
20+ # Display all the passed parameters:
21+ $PSBoundParameters
2222
23- # or with a switch statement:
24- switch ($PSBoundParameters.Keys ) {
23+ # or with a switch statement:
24+ switch ($PSBoundParameters.Keys ) {
2525 ' Text' { write-output ' A value for Text was supplied' }
2626 ' Number' { write-output ' A value for Number was supplied' }
27- }
27+ }
2828
29- # or looping through all the key/value pairs
30- foreach ($boundparam in $PSBoundParameters.GetEnumerator ()) {
31- " Key={0} Value={1}" -f $boundparam.Key , $boundparam.Value
32- }
29+ # or looping through all the key/value pairs
30+ foreach ($boundparam in $PSBoundParameters.GetEnumerator ()) {
31+ " Key={0} Value={1}" -f $boundparam.Key , $boundparam.Value
32+ }
3333
34- # or Call a second function passing all the parameters plus any extra if needed:
35- Test-PSBoundParametersPriv @PSBoundParameters - ExtraDemoParam ' Testing 123'
34+ # or Call a second function passing all the parameters plus any extra if needed:
35+ # Test-PSBoundParametersPriv @PSBoundParameters -ExtraDemoParam 'Testing 123'
3636}
You can’t perform that action at this time.
0 commit comments