Finding PowerShell cmdlets that use a particular parameter

May 3, 2011 at 11:27 am Leave a comment

There are times when I have wanted to know what cmdlets use a particular parameter, such as ComputerName or PassThru, so I have added the following function to my profile:

function Get-CommandByParameter ([string]$Parameter)
{
    Get-Command | Where-Object {try {$_.Parameters.Keys -contains $Parameter} catch {}}
}
Advertisements

Entry filed under: PowerShell.

Problem deleting a corrupt SharePoint 2010 List NetComm NP206 Wireless Powerline Kit

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Calendar

May 2011
M T W T F S S
« Mar   Nov »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Most Recent Posts


%d bloggers like this: