Updating Help on PowerShell v3

One of the new features in PowerShell v3 is the capability to update the help files. In fact you have to do this because PowerShell v3 doesn’t ship with any help files. Since Windows 8 RTM’d there have been a succession of new help files released.

I discovered one of my netbooks didn’t have the latest version of the help files installed. So I needed to update them. This got me thinking that it would be better if the machine did this for me.

I could think of two easy ways to do this – a scheduled job or a scheduled task. I chose the scheduled task because the ScheduledTasks module is available on the version of PowerShell v3 for Windows 7 and other legacy versions of Windows. The PSScheduledJob module is only available on Windows 8/2012 as it’s based on WMI classes not present on older versions of Windows.

$actionscript = '-NonInteractive -WindowStyle Normal -NoLogo -NoProfile -NoExit -Command "& {Update-Help -UICulture en-US -Force}"'            
$pstart =  "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe"            
#$days = "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"             
$days = 'Wednesday'            
Get-ScheduledTask -TaskName UpdatePSHelp | Unregister-ScheduledTask -Confirm:$false            
$act = New-ScheduledTaskAction -Execute $pstart -Argument $actionscript            
$trig = New-ScheduledTaskTrigger -Weekly -WeeksInterval 4 -At 19:00 -DaysOfWeek $days            
Register-ScheduledTask -TaskName UpdatePSHelp -Action $act -Trigger $trig -RunLevel Highest

Start by creating the command strings to start PowerShell and the arguments you pass to it.  I left it as a visible PowerShell window that stays opn so I can see the results. The PowerShell command

Update-Help -UICulture en-US –Force

performs the actual update.  You will need to change the culture to match yours if you aren’t using English.  You can find it by using


I’m only going to run this on Wednesdays .

Any old copies of the task are cleaned out and new task actions (to execute PowerShell) and trigger to define when it runs are created. The last line registers the task.

You can view the task

Get-ScheduledTask -TaskName UpdatePSHelp

or start the task manually

Start-ScheduledTask -TaskName UpdatePSHelp

This entry was posted in PowerShell V3. Bookmark the permalink.

6 Responses to Updating Help on PowerShell v3

  1. cavallogolooso says:

    I can say that update-help doesn’t work so well with regional versions of windows. They don’t keep it quite updated.

  2. Bruce says:

    On my Win 7 system with v3 installed, i have PSScheduledJob binary module available but no ScheduledTasks or PSScheduledTasks modules.

    CommandType Name ModuleName
    ———– —- ———-
    Cmdlet Add-JobTrigger PSScheduledJob
    Cmdlet Disable-JobTrigger PSScheduledJob
    Cmdlet Disable-ScheduledJob PSScheduledJob
    Cmdlet Enable-JobTrigger PSScheduledJob
    Cmdlet Enable-ScheduledJob PSScheduledJob
    Cmdlet Get-JobTrigger PSScheduledJob
    Cmdlet Get-ScheduledJob PSScheduledJob
    Cmdlet Get-ScheduledJobOption PSScheduledJob
    Cmdlet New-JobTrigger PSScheduledJob
    Cmdlet New-ScheduledJobOption PSScheduledJob
    Cmdlet Register-ScheduledJob PSScheduledJob
    Cmdlet Remove-JobTrigger PSScheduledJob
    Cmdlet Set-JobTrigger PSScheduledJob
    Cmdlet Set-ScheduledJob PSScheduledJob
    Cmdlet Set-ScheduledJobOption PSScheduledJob
    Cmdlet Unregister-ScheduledJob PSScheduledJob

  3. Pingback: Get-Scripting Podcast Episode 34 | CrypticZero

  4. Derf User says:

    PS 84 D:\Scripts> get-job

    Id Name PSJobTypeName State HasMoreData Location Command
    — —- ————- —– ———– ——– ——-
    12 UpdateHelp PSScheduledJob Completed True localhost Update-Help -Module * …
    13 UpdateHelp PSScheduledJob Completed True localhost Update-Help -Module * …
    Each week this Job list grows. What needs doing here – Receive-Job or not?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s