I need to check all of my parameters in a given function to see what is being used and what is not. Is there a variable I can examine rather than having to look at each parameter one by one?
by DonJ at 2012-10-23 15:45:56
Well, $PSBoundParameters has all bound parameters; this won't include any parameter which received pipeline input, though. I don't think. But you sort of still have to look at each one, right? It's a hashtable, so the keys are your parameter names: $PSBoundParameters.ContainsKey('whatever') would return $True if that parameter was used.