Splatting is a really great feature in PowerShell that lets you take a hash of parameters and call a function or cmdlet with the hash instead of having to type out every parameter name and value. It seems natural then that if you’re writing a wrapper or proxy function, where your function takes the same or nearly the same parameters as the function you’re calling, you could use
$PSBoundParameters to do the heavy lifting (this special variable contains all of the parameter values passed into the function).
The problem comes when your proxy function has defaults for its optional parameters.
$PSBoundParameters only includes the values of parameters that were explicitly supplied by the caller. There is no such variable that contains the default values.