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.

Once the UpdateHelpTrackErrors script runs, a progress bar displays indicating the progress as the<br />

updatable help files update. Once the script <strong>com</strong>pletes, any errors appear in order. The script and<br />

associated errors appear in Figure 1-2.<br />

FIGURE 1-2 Cleaner error output from updatable help generated <strong>by</strong> the UpdateHelpTrackErrors script.<br />

You can also determine which modules receive updated help <strong>by</strong> running the Update-Help cmdlet<br />

with the -verbose parameter. Unfortunately, when you do this, the output scrolls <strong>by</strong> so fast that it is<br />

hard to see what has actually updated. To solve this problem, redirect the verbose output to a text<br />

file. In the <strong>com</strong>mand that follows, all modules attempt to update help. The verbose messages redirect<br />

to a text file named updatedhelp.txt in a folder named fso off the root.<br />

Update-Help -module * -force -verbose 4>>c:\fso\updatedhelp.txt<br />

<strong>Windows</strong> <strong>PowerShell</strong> has a high level of discoverability; that is, to learn how to use <strong>PowerShell</strong>, you<br />

can simply use <strong>PowerShell</strong>. Online help serves an important role in assisting in this discoverability.<br />

The help system in <strong>Windows</strong> <strong>PowerShell</strong> can be entered <strong>by</strong> several methods. To learn about using<br />

<strong>Windows</strong> <strong>PowerShell</strong>, use the Get-Help cmdlet as follows:<br />

Get-Help Get-Help<br />

This <strong>com</strong>mand prints out help about the Get-Help cmdlet. The output from this cmdlet is illustrated<br />

here:<br />

CHAPTER 1 Overview of <strong>Windows</strong> <strong>PowerShell</strong> <strong>3.0</strong> 15

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

Saved successfully!

Ooh no, something went wrong!