Summary: Learn how to find Windows PowerShell cmdlets that have a specific parameter that accepts specific types.
How can I find all Windows PowerShell cmdlets that have a parameter named ComputerName that accepts an array of strings?
Import all the modules, then use the Get-Command cmdlet to look for a ParameterName of ComputerName and a ParameterType of [string[]]:
Get-Module –list | import-Module
Get-Command –ParameterType [string[]] –ParameterName ComputerName
The following script counts how many cmdlets have a parameter named ComputerName that accepts a string, and how many accept an array of strings:
PS C:\> gcm -ParameterType [string] -ParameterName computername | measure
Count : 549
Average :
Sum :
Maximum :
Minimum :
Property :
PS C:\> gcm -ParameterType [string[]] -ParameterName computername | measure
Count : 204
Average :
Sum :
Maximum :
Minimum :
Property :