#pwsh tip of the day!
$PSBoundParameters doesn't account for params whom have a default value. Thankfully, you can still get this information! Enter $PSCmdlet! You can pull the bound parameters off of the Invocation Property of that object.
I put together a quick example at:
Happy Scripting!
$PSBoundParameters doesn't account for params whom have a default value. Thankfully, you can still get this information! Enter $PSCmdlet! You can pull the bound parameters off of the Invocation Property of that object.
I put together a quick example at:
Happy Scripting!
Comments
A couple of quick suggestions both perf related.
1. `Foreach ()` is faster than `Foreach-Object`
2. `$executionContext.sessionstate.psvariable.get('var').value` is much faster than `Get-Variable`
Great work!