Created
May 4, 2018 20:20
-
-
Save ChrisMagnuson/e342d7667e571565dfc8a87cd4b7a5af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test { | |
param ( | |
$Parameter1, | |
$Parameter2 | |
) | |
$PSBoundParameters | |
} | |
$spalt = @{} | |
test @spalt | |
$Parameter1 = "value" | |
Test @Parameter1 | |
$Parameter1 = "value" | |
$Parameter2 = "value2" | |
Test @Parameter1 @Parameter2 | |
$splat = @{ | |
Parameter1 = "value1" | |
Parameter2 = "value2" | |
} | |
Test @splat | |
$splat = @{ | |
Parameter1 = $DeoesntExist | |
Parameter2 = "value2" | |
} | |
Test @splat | |
$splat = @{ | |
Parameter2 = "value2" | |
} | |
Test @splat @DoesntExist | |
$splat = @{ | |
Parameter2 = "value2" | |
} | |
$EmptyHash = @{} | |
Test @splat @EmptyHash | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment