This article
from the Windows Powershell Blog does a great job of elegantly explaining splatting
in both V1 and V2. An even more condensed set of examples:
V1 example (splatting a switch is the gotcha here)
Test-FunctionCall -stringArg:$stringArg -switchArg:$switchArg;
V2 example
Test-FunctionCall @psBoundParameters;
No comments:
Post a Comment