Windows PowerShell


PowerShell 2.0 and Get-Help -online

PowerShell 2.0 Get-Help -online Parameter

One helpful new feature of PowerShell v 2.0 is the -online parameter.  As its name suggests, -online enables us to get the latest support for a cmdlet direct from Microsoft's website.  The main purpose of this page is simply to explain how to get PowerShell's -online switch to work.  My secondary aim is to present a case study on the frustration of learning a skill that is ostensibly simple but nevertheless slippery.

Get-help Verb-Noun -Online

When this technique works it's like magic; issue the -online command and be amazed to see the browser launch at a url such as:
http:// go.microsoft.com/fwlink/? LinkID=113322.  The point is that if Microsoft ever amends the help file then the latest information will be there on the website, there will be no need for Microsoft to update PowerShell every time they edit a help file.

If the -online switch worked for you straightaway, then read no further.  However, if you are struggling with its syntax, then read on and I will explain the knack of using PowerShell's -online parameter.

Example to get online information about the get-Service cmdlet

The secret of success is to start with the instruction 'get-Help', or just plain 'Help' if you prefer.  Next comes the name of the cmdlet that you want to research, and finally, the word -online.

get-Help get-Service -online

While the above command works fine, however, this command below fails because I forgot to precede the cmdlet with get-Help.

get-Service -online

To double check your understanding try this:

get-help get-help

You should see -online listed among the parameters; for even more information append the -full parameter.

Next try this example:

get-Help get-Service

There should be no sign of -online amongst the parameters.  However, you should see in the 'Related Links' at the bottom:
Online version: http://go.microsoft.com/fwlink/?LinkID=113332

Guy Recommends: SolarWinds LANSurveyorSolarwinds LANSurveyor

LANSurveyor will produce a neat diagram of your network topology.  But that's just the start; LANSurveyor can create an inventory of the hardware and software of your machines and network devices.  Other neat features include dynamic update for when you add new devices to your network.  I also love the ability to export the diagrams to Microsoft Visio.

Finally, Guy bets that if you take a free trial of LANSurveyor then you will find a device on your network that you had forgotten about, or someone else installed without you realizing!

Download a Free Trial of LANSurveyor

Guy's Learning Frustration

My first mistake was to believe that -online was a parameter supported by every PowerShell cmdlet, whereas in reality it's only available with get-Help.

My second problem was unfortunate; I used an early beta version of PowerShell 2.0. The Microsoft developers had not added the -online parameter to this version, thus I had no chance of finding it!  My stupidity here is not being more careful with beta software; how many more fingers will I burn before absorbing this lesson?

This saga of understanding -online reminds me a pupil called DK, who I taught science.  The reason that DK could not learn to read was merely because he did not know what the word 'next' meant.  The English teacher would say. "David what's this next word", pointing to 'Cat'.  David replied, "I don't know".  Once we discovered his learning block was the word 'next', DK's education blossomed and he went on become a successful formula one mechanic.

PowerShell Forums

In this instance, it was Marco Shaw at the Microsoft TechNet forum who patiently explained to me how to get the -online parameter to work.  And there is another good forum at microsoft.public.windows.powershell.  Without seeming ungrateful, my plea is that wherever possible technical forums should amalgamate.  While I prize diversity in the food and beer industries, I would welcome centralization is the case of PowerShell forums.

Summary of PowerShell 2.0's -online Parameter

Just remember that the -online technique for getting extra help is a parameter of get-Help.  For all other cmdlets your best chance of finding the most relevant url is to look in the 'Related Links'.

See more Microsoft PowerShell tutorials

PowerShell Home  • Introduction  • Dreams  • 3 Key Commands  • Cmdlet scripts  • Real life tasks

Remote PowerShell  • -Online  • WinRm and WSMan  • Invoke-Command  • Jobs  -asJob   • PowerShell

Please write in if you see errors of any kind.  Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.

Download my ebook:Getting Started with PowerShell
Getting Started with PowerShell - only $9.25

You get 36 topics organized into these 3 sections:
   1) Getting Started
   2) Real-life tasks
   3) Examples of Syntax.

In addition to the ebook, you get a PDF version of this  Introduction to PowerShell ebook  It runs to 120 pages of A4.

 *


Google

Web  This website

Review of Orion NPMGuy Recommends: Orion's NPM - Network Performance Monitor

Orion's performance monitor is designed for detecting network outages. A network-centric view make it easy to see what's working, and what needs your attention.

This utility guides you through troubleshooting by indicating whether the root cause is faulty equipment or resource overload.

Download a free trial of the Network Performance Monitor

 

Home Copyright © 1999-2009 Computer Performance LTD All rights reserved

Please report a broken link, or an error.