Using online help is very easy.
So let's jump back into PowerShell one more time and let me show you
how. Once again let's start and look at help for a command like
Get‑Process, one of our favorite commands here in this course. If we
look down here under related links,
we can see not only listings for other commands,
but there is a link for an online source of this help content.
Now you don't have to try to copy and paste that. We can just run help
Get‑Process ‑online, and this will go for pretty much any commandlet that has
an online link, ‑online should open it up. And what it will do is open the
link in your default browser, which for me,
is Microsoft Edge here, and here we go! And you can see, here
is the help documentation for Get‑Process.
This should be the same information that we see from the console.
Now there are some advantages here in going online to look
at this. For one, if I wanted to copy,
say, this syntax, there are options here to copy and then I
could paste it then into VS Code or in PowerShell ISE, or
whatever I'm using to write my scripts.
Here is the description.
Here are the examples. Again, I could copy and paste the
examples if I want to try them out for myself.
Everything's here, I can scroll all the way down here to the bottom.
You can see all the parameters as well. And at the very end,
our links for the feedback on this page, remember I said all the
PowerShell help documentation is open source.
Let me also draw your attention, since we're already in a browser. Right now,
I'm seeing help over here for PowerShell version 7. There are
other versions of PowerShell, so if by chance you happen to be
using Windows PowerShell still,
you could come here to version 5.1 and look at the 5.1
version. We're going to stick to PowerShell 7.
And as you can see here, there are other commands as well.
So once you are in the page,
you can actually scroll through and look at help
for all sorts of other commands.
And I want to go back to PowerShell here because I want to show
you that there is also help for other commands.
There is a module installed on this machine called PS Release Tools,
which is a module I wrote.
You can install from the PowerShell gallery.
There's a note in the demo that you can download.
This module has commands that will make it easy to install
PowerShell 7 on your Windows machine.
So when I wrote this,
I included an online link for the Install‑PowerShell command, so
I can do ‑online, and in my particular case,
this takes me to the GitHub repository,
and it takes me to the markdown version of the help document.
So this is a little bit different than what we saw with the Microsoft,
I don't have the necessarily the copy and paste functionality.
But this might be a little bit easier to read.
And if by chance I am have updated the help, but maybe you
are running an older version of the module,
you may not realize that something may have changed in the command, so
looking at the online help really can be to your benefit.
Unfortunately,
help doesn't work all the time, or I should say,
online help doesn't work all the time.
Let's look at help for a command called Test‑NetConnection.
There is an online link there,
so let's try help Test‑NetConnection and do ‑online and see what happens.
All right, so there is help here.
However,
it may slightly be out of date because you conceive the message
there that Microsoft is no longer updating the help.
I don't know what's going to happen with this module.
I have no idea what the long term plans are.
It may be that it gets revised and that help will be updated.
But it's still better than nothing, so, you can get online help.
Again I have a nice copy feature, I have again all of the
details on the parameters, all of the examples.
It's all there, so you still may find help, but it may not be maintained.
The last thing that is a potential gotcha as much
as you may be thinking oh great, all this online help is awesome.
Let's go back to my vegetable commands. To get vegetable, so you decide, hey,
let's look at the online help, forget vegetable.
Yeah I get an error message there.
The online version of the help topic cannot be displayed,
well, that's because if we look at help,
for get‑vegetable, you can see under related links, there's no online link,
so this particular command doesn't have online help, so of course you are out of
luck. There is no online version of help for this command,
and you will find this in other commands as well,
both from Microsoft and other third party vendors and from
modules that you may install from the community.
There's no requirement that PowerShell has online help.
That's why you have to look at the help documentation.
If you see the link,
then you can use it. The last thing here with online
help, it's an unfortunate deficiency.
If I run help about_Aliases and say, you know what, let me
see the online version. That also fails. None of the about
topics have online links.
We in the PowerShell community and the MVP's, we've
asked for this for a long time, and it still has never happened.
I don't know if it ever will.
Let's go back to Internet Explorer here and let me go back
to my Get‑Process command. Remember I showed you that I can
get help for other commands.
I can also come here and let's type a search for about_aliases.
Click the link there, and now here is a link for about aliases.
Now I have the about topic, the online version.
So the online version exists.
That's why we wish there was a link in the local help to bring me to this page,
but it doesn't exist.
But once you're here, then you're good to go,
because now I can read the about topic all online, and I can read
the most current version of the about topic,
and as you can see here, here are all the other about topics, so I
can just scroll through and read the about topics.
You may want to bookmark this page so you can get back to
this information really nice and quickly.
That is a look at working with the online versions of help,
something that you probably want to get in the habit of doing.
It is nice to be able to copy and paste,
especially the examples,
so that you can try them out for yourself because it's a great way
to learn PowerShell and to see how it works. Let's go back to the slides and wrap it all up.