Getting Cmdlet Help From Within The PowerShell Console

 

There are several ways in which you can find information on the various PowerShell Cmdlets that are available to you. There is the documentation that ships with PowerShell as well as the Microsoft PowerShell home page at:

 

http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx

 

There are also ways from within the PowerShell console that you can get bare bones information on the Cmdlet(s) you want more info on as well. If you type into the PowerShell console using the following syntax you can get this bare bones information:

 

Get-Help CmdletName

 

Note: You can also use the Get-Help alias of Help as well as shown in the examples to follow.

 

For example if you want some basic information on the Get-Variable Cmdlet simply type in: Help Get-Variable.

 

If you want only examples of how to use a Cmdlet such as the Get-Variable Cmdlet type in: Help Get-Variable –Examples.

 

You can also get more detailed help on a specific Cmdlet by entering the following: Help CmdletName –Detailed. You can take this one step further by issuing the following that will provide you with the full help for the specified Cmdlet Help CmdletName –Full.

 

When you use the –Detailed or –Full command switches you will see the following displayed at the bottom of a buffer screen: -- More – To move through the screens press the space bar to continue through them one at a time as you would do if you issued the MS-DOS command | More.

 

Tip: If you want to have the results sent to a file rather than to the screen you can enter the following: Help Get-Variable –Full > C:\CmdletHelp.Txt or you can simply copy and paste the screen text from the PowerShell console. You can accomplish this by clicking the PowerShell icon on the top left corner of the console and from the menu select “Edit” and then choose “Select All” and then click the PowerShell icon again and select “Copy’ and then you can paste the text into your favorite editor.

 

 

Published Sunday, February 25, 2007 10:08 AM by dhite
Filed under:

Comments

No Comments