r/PowerShell • • Apr 05 '19

PowerShell tricks: Splatting

https://blog.destruktive.one/powershell-tricks-splatting/
150 Upvotes

58 comments sorted by

View all comments

0

u/[deleted] Apr 06 '19

[deleted]

5

u/sk82jack Apr 06 '19

Splatting is the action that you do to a hashtable. Build a hashtable where the keys are a function's parameters and then splat it to that particular function.

2

u/destruktive Apr 06 '19

Yup. This is why you refer to it with @ and not # so that PowerShell is aware that the objects in the hashtable is supposed to be used as parameters.