1.4. Getting Help

When you're using PowerShell, you need to be able to find out how to use commands that you are already aware of or that you find by using the techniques described in the previous section.

You use the get-help cmdlet to get help information about individual cmdlets. You can use the get-help cmdlet with or without parameters. Using the get-help cmdlet with no parameters displays abbreviated help information.

For example, to get help on the get-process cmdlet type either:

get-help get-process

or:

get-process -?

at the PowerShell command line.

The default behavior of the get-help cmdlet when providing help information about a specific command is to dump all the help text to the screen at once, causing anything that won't fit on one screen to scroll off the screen and out of sight. You may find it more useful to display the help information one screen at a time by using More:

get-help get-process| More

or:

get-process -? | More

You are likely to have the help function available to you. It behaves similarly to the get-help cmdlet, except that the help function displays the help information one screen at a time. To display the help information for the get-process cmdlet one screen at a time, you can type:

help get-process

Since that is a little shorter to type than the get-help syntax, you may find that it's more convenient.

PowerShell displays help information in a way similar to man in Unix. The help for each command or other piece of syntax is structured in the following ...

Get Professional Windows® PowerShell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.