I wanted to count the number of parameters that each Powershell cmdlet needed, and noticed something strange:
$a = Get-Command Test-Connection
$a.Parameters.Count
I would expect the result 13, but instead got an object, because the dictionary / hash table of the parameters really contains the key 'Count'( $a.Parameters.'Count').
How to differentiate a call to a property call Count(getter method) of a dictionary and access to an element $a.'Count'?
source
share