Open lzybkr opened 11 years ago
I like this idea but I guess we would need to include all cmdlets that support binding ByPropertyName for any of their parameters too... Even if none of the properties match the parameter there is still scriptblock that user could pass to convert property to parameter: One I use from time to time (with some filters to it) is Get-Process | Get-ChildItem.
Many built-in commands specify OutputType. Command completion could leverage this by only returning commands that take an object of type OutputType as a pipeline parameter. For example:
Get-Disk |
Here we could suggest only commands that accept a MSFT_Disk, e.g. these commands:
Get-Command -ParameterType MSFT_Disk