Thursday, August 18, 2011

Learn Windows PowerShell

use the Get-Help about* command as follows:

get-help about*


Suppose you do not remember the exact name of the cmdlet you wish to use, but you remember


it was a get cmdlet? You can use a wild card, such as an asterisk (*), to obtain the name of the cmdlet. This is shown here: 

get-help get*


 This technique of using a wild card operator can be extended further. If you remember that the cmdlet was a get cmdlet, and that it started with the letter p, you can use the following


Syntax
To retrieve the desired cmdlet:
                                                     get-help get-p*

 Suppose, however, that you know the exact name of the cmdlet, but you cannot exactly remember the syntax. For this scenario, you can use the -examples argument. For example, for the Get-PSDrive cmdlet, you would use Get-Help with the -examples argument, as follows:


get-help get-psdrive –examples


To see help displayed one page at a time, you can use the help function, which displays the help output text through the more function. This is useful if you want to avoid scrolling up and down to see the help output.
 

No comments:

Post a Comment