Finding cmdlets by name is easy:
But how can you list all cmdlets that support a given parameter? If you’d like to see all cmdlets with a -List parameter?
The easiest way is to use Get-Help with the parameter -parameter:
Or, you can use Get-Command and filter the result by parameter. You’ll need a custom filter to accomplish this:
param($name)
$number = @($_ | % { $_.ParameterSets | % { $_.Parameters | ? { $_.Name -eq $name}}}).Count
if ($number -gt 0) {
$_
}
}
This filter allows only those to pass the pipeline that supports the given parameter. Here is how you use the filter: