1

#PSTip List all cmdlets with a specified parameter – The PowerShell 3.0 way!

In Windows PowerShell 2.0, if we had to list a complete list of cmdlets that had a specific parameter, we could have done it in a couple of different ways:

Get-Help * -Parameter ComputerName

or we can examine the cmdlet meta returned by Get-Command cmdlet!

Get-Command * | Where {$_.Definition -like "*-ComputerName*"}

In PowerShell 3.0, Get-Command cmdlet provides a simple way to do this.

Get-Command -ParameterName ComputerName
Filed in: Columns, Tips and Tricks Tags: ,

One Response to "#PSTip List all cmdlets with a specified parameter – The PowerShell 3.0 way!"

  1. john.s2011 says:

    Hi Ravikanth.
    that’s great, really needed it.

    special thanks

    best regards

Leave a Reply

Submit Comment

© 2016 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: