Datasheet

Chapter 1: Getting Started with Windows PowerShell
19
Get-Command can also be used to return detailed information about the syntax of a given cmdlet using
the
Syntax parameter. However, you may find the syntax information exposed in a cmdlet ’ s help
information to be more useful in the long run because it is accompanied by other help details.
Using Help Information Effectively
Cmdlet help information is very detailed and you may find it difficult to follow when you first start
learning about a given cmdlet. Luckily
Get-Help makes it possible to access specific areas of help
information in varying degrees of detail. Using
Get-Help effectively allows you to access the
information you are interested in without displaying the entire help information available for a cmdlet.
There are three versions of
Get-Help that display help information differently depending on how they
are used:
Get-Help displays help information without pausing when the console display is full.
Parameters are used with
Get-Help to determine the type of information and detail level
displayed. The basic syntax is
Get-Help < cmdlet name > < parameters > .
Help is a function based on Get-Help that displays help information one screenful at a time,
pausing when the console screen is full to allow the operator to advance the display either one
full page using the space bar, or one line using the Enter key. The parameters available for
Get-Help also work with Help . The basic syntax is Help < cmdlet name > < parameters > .
-? is a pseudo - parameter that displays basic help information without pausing when the
console display is full.
-? takes no parameters as input like the other versions of Get-Help .
The basic syntax is
< cmdlet name > -? .
The information contained in cmdlet help files you will find most interesting is divided into six major
topics. By using certain parameters with
Get-Help , you can display each of these topics in varying
degrees of detail:
Synopsis: A brief description of the cmdlet and what it does.
Syntax: One or more syntax diagrams that detail the use of the cmdlet and its input parameters.
Detailed Description: A more detailed description than the synopsis.
Parameters: A detailed description of each parameter and how they are used.
Examples: One or more examples of how the cmdlet is executed.
Related Links: The names of other cmdlets that may be related in some way to this cmdlet.
The command
Get-Help < cmdlet name > without any parameters displays the Synopsis, Syntax,
Detailed Description, and Related Links topics. This is the same information displayed when using the
command
< cmdlet name > -? .
The command
Get-Help < cmdlet name > -Detailed displays additional information about the
cmdlet including descriptions of each parameter (but not details) along with the Examples topic.
c01.indd 19c01.indd 19 12/17/07 3:19:28 PM12/17/07 3:19:28 PM