PowerShell 3.0 Update-Help

Update-Help in Windows PowerShell 3.0PowerShell 3.0 Update Help

The idea of getting extra information about PowerShell 3.0 cmdlets is great; however, using Update-Help is by no means straightforward.

 ♦

Update-Help – New Cmdlet in PowerShell 3.0

The theory is simple enough, just run:

# PowerShell 3.0 Updateable Help
# Remember to ‘Run as administrator’
Update-Help

Note 1: If you need to run this command for a second time then append the -force switch.

Note 2: This simplest of commands maybe all that you ever need to get more detail about PowerShell v3 cmdlets.

Getting Help for Update-Help!

Amazingly, Get-Help applies even to Update-Help!

# Research PowerShell’s Update-Help Syntax
Get-Help Update-Help

Note 3: This is how I discovered -force; and another useful parameter called -source.

Troubleshooting Update-Help

  1. Before you launch PowerShell 3.0, remember to right-click and: ‘Run as Administrator’, otherwise you get an error message when your try Update-Help.
  2. Recollect that Update-Help is new in v3.
  3. It is best to launch the plain command-line version of PowerShell, Update-Help is one instance where the ISE version seems a little flaky, or it could just be that I was using the CTP 2 beta version of PowerShell 3.0.
  4. As usual, working with non-English versions of PowerShell 3.0 can be a trial.  One technique is to download the help files by using the Save-Help cmdlet, then import by appending the -source parameter.

Guy Recommends: Free WMI Monitor for PowerShellSolarwinds Free WMI Monitor for PowerShell

Windows Management Instrumentation (WMI) is one of the hidden treasures of Microsoft’s operating systems.  Fortunately, SolarWinds have created a Free WMI Monitor so that you can discover these gems of performance information, and thus improve your PowerShell scripts.

Take the guess work out of which WMI counters to use when scripting the operating system, Active Directory, or Exchange Server. Give this WMI monitor a try – it’s free.

Download your free copy of WMI Monitor

Scheduling Update Help

# Prepare to Schedule an Update for Help
If ((Get-Date).DayOfWeek -eq "Friday") {Update-Help}

Save the above PowerShell command, for example: Update.ps1.  Take a note of your full path:  e.g. D:\PShell\Update.ps1.  Then run this file as a scheduled task.  See more about using PowerShell to schedule a task.

Problems with Help Files

For a scripting language PowerShell has always had above average help for its commands.  The sheer volume of cmdlets in PowerShell 3.0 mean that Microsoft needed a new strategy for making sure the information was accurate.

With PowerShell 1.0 the help files were cast in stone.  If there were typos or more serious errors there was no easy way to update the information.  Matters improved in PowerShell 2.0 with the -online parameter which directed requests to updates online.  However, one has to remember to append that command, it did not change the local help files.

In PowerShell 3.0 Microsoft came up with the idea of built-in cmdlet to refresh the help files when errors are fixed back at PowerShell head-quarters.

Research Windows Updates and Service Packs

PowerShell's Get-Hotfix will display a list of patches, service packs and security hotfixes.

# PowerShell's Get-HotFix Example
Get-HotFix | Format-Table HotfixID, Description, InstalledOn -AutoSize

See more on Get-Hotfix ยป

Summary of PowerShell’s Updateable Help

The first point to remember is that this cmdlet is only available on PowerShell v 3.0 and later.  I found Update-Help particularly difficult to configure so that it delivered the package of revised help files.

If you like this page then please share it with your friends

 


See more Microsoft PowerShell v 3.0

PowerShell Tutorials  • What’s New in PowerShell 3.0  • PowerShell 3.0 Foreach-Object

PowerShell Show-Command  • Out-GridView -PassThru  • PowerShell Ordered Hash Tables

PowerShell Version 3.0  • PowerShell 3.0 Get-ChildItem  • PowerShell 3.0 Update-Help