PowerShell for Windows Admins

Mar 3 2012   6:04AM GMT

PowerShell v3 Updateable Help

Richard Siddaway Richard Siddaway Profile: Richard Siddaway

One of the things that we have become used to in PowerShell v1 and v2 is the help files. They are installed with PowerShell, available on line and a graphical version is available for download. The online help files are updated over time but the local files aren’t.  This changes with PowerShell v3.

When you install PowerShell v3 (or install Windows 8/Windows Server 8 ) help files are not installed. Thats right you don’t get help files available. If you try using help you get this

 

PS> get-help get-process

NAME
    Get-Process

SYNTAX
    Get-Process [[-Name] <string[]>] [-ComputerName <string[]>] [-Module] [-FileVersionInfo]  [<CommonParameters>]

    Get-Process -Id <int[]> [-ComputerName <string[]>] [-Module] [-FileVersionInfo]  [<CommonParameters>]

    Get-Process -InputObject <Process[]> [-ComputerName <string[]>] [-Module] [-FileVersionInfo]  [<CommonParameters>]

ALIASES
    gps
    ps

REMARKS
    Get-Help cannot find the Help files for this cmdlet on this computer. It is displaying only partial help.
        — To download and install Help files for the module that includes this cmdlet, use Update-Help.
        — To view the Help topic for this cmdlet online, type: "Get-Help Get-Process -Online" or
           go to
http://go.microsoft.com/fwlink/?LinkID=113324.

 

Using –full doesn’t bring more information and –examples doesn’t help either.

This may seem like a huge step backwards – how are we going to work without the local help files. I use them on a regular basis. Help. I want my help files back.

OK – what we get in PowerShell v3 is updateable help.  This means that you can pull the help files from the web and get them installed. Notice the Remarks section above about using Update-Help. The PowerShell core module has 3 cmdlets related to help

Get-Help
Save-Help  – downloads help files for later use via update-help
Update-Help – downloads and immediately updates help files

To use Save-help or Update-help you need to start PowerShell with elevated privileges (Run as administrator)

NAME
    Save-Help

SYNTAX
    Save-Help [-DestinationPath] <string[]> [[-Module] <string[]>] [[-UICulture] <string[]>] [-UseDefaultCredentials]
    [-Force]  [<CommonParameters>]

    Save-Help [[-Module] <string[]>] [[-UICulture] <string[]>] -LiteralPath <string[]> [-UseDefaultCredentials]
    [-Force]  [<CommonParameters>]

PS> get-help Update-Help

NAME
    Update-Help

SYNTAX
    Update-Help [[-Module] <string[]>] [[-SourcePath] <string[]>] [[-UICulture] <string[]>] [-Recurse]
    [-UseDefaultCredentials] [-Force]  [<CommonParameters>]

    Update-Help [[-Module] <string[]>] [[-UICulture] <string[]>] [-LiteralPath <string[]>] [-Recurse]
    [-UseDefaultCredentials] [-Force]  [<CommonParameters>]

 

Notice that we can update the help for individual modules

Lets pull down the help files first

Save-Help -DestinationPath c:\source\helpfiles -UICulture en-US -Force –Verbose

You will see a progress bar and messages like

VERBOSE: Your connection has been redirected to the following URI:
"http://download.microsoft.com/download/3/4/C/34C6B4B6-63FC-46BE-9073-FC75EAD5A136/"
VERBOSE: Microsoft.PowerShell.Management: Saved
C:\source\helpfiles\Microsoft.PowerShell.Management_eefcb906-b326-4e99-9f54-8b4bb6ef3c6d_en-US_HelpContent.cab. Culture
en-US Version 3.0.0.0

for each help file that is downloaded.

the –Force parameter is interesting as it allows you to run a Save-Help or Update-Help command for the same module more than once each day.

I have found it is sometimes necessary to run save-help or update-help a couple of times to get all of the files downloaded

The help files can then be updated like this

Update-Help -SourcePath c:\source\helpfiles -UICulture en-US -Force –Verbose

 

You will get messages like this

VERBOSE: Microsoft.PowerShell.Management: Updated
C:\Windows\System32\WindowsPowerShell\v1.0\en-US\Microsoft.PowerShell.Commands.Management.dll-help.xml. Culture en-US
Version 3.0.0.0

 

VERBOSE: Microsoft.PowerShell.Core: Updated
C:\Windows\System32\WindowsPowerShell\v1.0\en-US\about_WMI_Cmdlets.help.txt. Culture en-US Version 3.0.0.0

 

Now

get-help Get-Process –full

will give you the help files you know and love

That is a two stage process but ahs the advantage that the help files can be pulled once and put on a network share for access by all systems. This is especially important for my servers where I don’t normally allow access to the Internet

The above tests were performed on PowerShell v3 on Windows 7 SP 1

The alternative is to update the help files directly

Update-Help  -UICulture en-US -Force –Verbose

 

Notice that in all cases I’ve given the UICulture – the help files come as a pair e.g.

Microsoft.PowerShell.Host_56d66100-99a0-4ffc-a12d-eee9a6718aef_en-US_HelpContent.cab
Microsoft.PowerShell.Host_56d66100-99a0-4ffc-a12d-eee9a6718aef_HelpInfo.xml

You need to get the culture right to pull down the correct help files. I use English culture but I’m not sure what other localised versions are available  at this stage in the development cycle.

If you are running a 64 bit OS it looks like the help for 64 and 32 bit versions of PowerShell are updated simultaneously.

The help files may not be complete at this stage of Powershell v3 development so don’t be surprised if you don’t get help updates  for all modules – especially on Windows 8 server

 Comment on this Post

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when other members comment.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: