04.07.2013 Views

Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly

Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly

Windows PowerShell 3.0 Step by Step - Cdn.oreilly.com - O'Reilly

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Get-Help get-p*<br />

Suppose, however, that you know the exact name of the cmdlet, but you cannot exactly remember<br />

the syntax. For this scenario, you can use the -examples argument. For example, for the Get-PSDrive<br />

cmdlet, you would use Get-Help with the -examples argument, as follows:<br />

Get-Help Get-PSDrive -examples<br />

To see help displayed one page at a time, you can use the Help function. The Help function passes<br />

your input to the Get-Help cmdlet, and pipelines the resulting information to the more.<strong>com</strong> utility.<br />

This causes output to display one page at a time in the <strong>Windows</strong> <strong>PowerShell</strong> console. This is useful if<br />

you want to avoid scrolling up and down to see the help output.<br />

note Keep in mind that in the <strong>Windows</strong> <strong>PowerShell</strong> ISE, the pager does not work, and<br />

therefore you will see no difference in output between Get-Help and Help. In the ISE, both<br />

Get-Help and Help behave the same way. However, it is likely that if you are using the<br />

<strong>Windows</strong> <strong>PowerShell</strong> ISE, you will use Show-Command for your help instead of relying on<br />

Get-Help.<br />

This formatted output is shown in Figure 1-3.<br />

FIGURE 1-3 Using Help to display information one page at a time.<br />

18 <strong>Windows</strong> <strong>PowerShell</strong> 3 <strong>Step</strong> <strong>by</strong> <strong>Step</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!