PowerShell

PowerShell Cmdlets: List all availabe parameters without using the Help

To find out the parameters of a Cmdlet, you can call the Windows PowerShell Help. To be faster you can use some tricks to get more out of Parameters.

Old Style: Get-Help

If you want to get all about parameters, then Get-Help is your friend.

Get-Help Get-ChildItem -Online
Get-Help Get-ChildItem -ShowWindow
Get-Help Get-ChildItem -Examples
Get-Help Get-ChildItem -Full

or more specific:

Get-Help Get-ChildItem -Parameter Path

Unbenannt.JPG

See also my German post: PowerShell: Hilfe verwenden (Get-Help).

CTRL + Space

Instead of browsing the help you can use CTRL + Space. Simply type Get-ChildItem. Then type – and then press CTRL + Space. This shows all parameters and afterwards you can use the arrow keys to choose one.

Unbenannt.PNG

Using Get-Command

To show all parameters, you can also use Get-Command.

(Get-Command Get-ChildItem).Parameters

Unbenannt.PNG

But I like it user-friendly. So I run

(Get-Command Get-ChildItem).Parameters.Values | Select-Object Name,Aliases,Switchparameter

Unbenannt.PNG

To show the location of the Helpfile type

(Get-Command Get-ChildItem).Helpfile

Unbenannt.PNG

To get the URI of the Online Help run

(Get-Command Get-ChildItem).HelpUri

Unbenannt.PNG

To open the found URL type

start http://go.microsoft.com/fwlink/?LinkID=113308

Categories: PowerShell

Tagged as: ,

1 reply »

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 )

Google+ photo

You are commenting using your Google+ 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 )

w

Connecting to %s