How to get all arguments passed to function (vs. optional only $args)

$PSBoundParameters gets you all the parameters that were “bound” along with the bound values in a hashtable, it doesn’t get you the optional/extra arguments. That is what $args is for. AFAICT the only way to get what you want is to combine the two:

$allArgs = $PsBoundParameters.Values + $args

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)