Let me begin with a brief overview of how PowerShell help works.
All of the help files you need are packaged with PowerShell modules.
Now a module is a self‑contained unit that includes related commands,
formatting files, help, and other files.
Now most help is package in an XML format called MAML, M‑A‑M‑L.
Now I tell you that more is a way of background information.
You won't need to manually do anything with these XML files.
PowerShell itself ships with a number of modules,
as well as other types of help files that we're going to look at later.
Now the nice part is that you don't have to do anything.
PowerShell automatically loads the modules and help files
when you start using these commands.
When you start a PowerShell session, you get a lot of them automatically,
and help is included for you.
All you need to do is use them.
And you don't need any special software or apps.
If you have a PowerShell prompt,
you can find and get all the help you need with a few simple commands.
In PowerShell, commands follow a very simple verb‑noun naming convention.
The verb comes from a standard list and are actions that you do all the time,
such as get, stop, start, remove.
The noun is the singular version of the thing that you
want to take an action on or with.
So it shouldn't be too surprising that the command to Get‑Help information is,
in fact, called Get‑Help.
Now just remember the dash in the name.
When referencing commands in PowerShell, we don't say Get dash Help typically.
It's Get‑Help.
The dash is implied.
This is something that trips up a lot of people who are new to PowerShell.
As you'll see when I get to the demo, most of the time,
we're going to use a command called help.
Now,
this is really nothing more than a simple PowerShell function
that wraps around the Get‑Help command, making it easier to use.
Help and Get‑Help under the hood really do the same thing.
The only difference is how they display the information.
Again, you'll see this when I get to the demo.
And if you're coming from the Linux world or just
want to be a little bit different, you can use the alias man.
Now it's important for you to understand though that this
isn't running the Linux man command.
This is simply an alternative way to run the help command.
Even though I told you a few minutes ago that PowerShell ships with help files,
this isn't entirely true.
Microsoft ships with a subset of help content.
Think of them as stubs.
And while the help may not necessarily be complete,
it does include enough information for more experienced users.
Now I think Microsoft has a long‑term goal here to deliver more
streamline products with the bare essentials,
relying on you to add the other bits and pieces that you need or want.
And you can think of PowerShell help as following this model.
For example,
because you shouldn't be logged on to servers that you
actively lease on a regular basis, you really don't need the full,
complete PowerShell help on those servers.
Your management model should be to do everything you need from your desktop.
That's where you want the full help.
The help files don't have a huge footprint,
but every little bit of savings helps.
So there's really very little reason to update help on your servers.
Do it on your desktop.
Now what this means for you though is that on new Windows 10
installations or new PowerShell 7 installs,
you'll want to update the local help content.
Now this isn't something you need to do all the time.
There is no mechanism enforcement right now in PowerShell to
let you know when help should be updated.
Nothing to tell you that Microsoft has new help or a new
package waiting for you to download,
at least not at the time I'm doing this course.
Personally, I update help once a month, really more out of habit than anything.
You can decide how often or when you want to update help.
I'll show you how to update and even to save help if
you're working in a team environment.
Now you may be wondering after all of this, why does all of this matter?
And it matters because PowerShell is under active development.
New releases are coming out a few times a year.
With each new release, there may be new commands.
There may be new parameters.
Or sometimes parameters are deprecated or removed.
The help should reflect those changes. PowerShell help may also be
updated to correct mistakes or expand content.
You have to get in the habit of reading help all the time and rereading it.
Back in the V1 days, we had maybe a few hundred commands.
Now I can learn help for a few hundred commands. However,
on a new laptop installation I'm working on for another project, I did
a quick look at the number of PowerShell commands,
and there were over 1600. On my primary desktop, there were over 5,000 commands.
Now there's no way I can learn and memorize and I doubt you can either.
So I have to rely on the help documentation. When I teach live classes, I stress
the importance of reading the help. I tell students I'll help them with these
exercises provided they have read the help first.
Inevitably, I'll have a student that will ask for help on a problem,
and I'll come over and I'll ask hey, did you read the help?
And of course, they'll say no, sorry,
I didn't didn't read the help. So I have them read
the help, and more often than not, once they read the help,
they can complete the exercise because they find the answer that I
am hoping they would find by reading the help.
Now personally, I've run into this same situation.
I remember, you know,
awhile ago banging my head trying to get a piece of code to work using a
command that I thought I knew, a command that I'd used for years.
Fine.
I couldn't get it to work.
So I went back and decided I'm going to go back and look at the help.
And there was, it just slapped me right in the face.
There was a parameter that was added at some point to the command
that I missed or never realized was there. Maybe it was there all
along, and I just never realized it.
As you'll see, the help content can be overwhelming,
and so don't even try to memorize it.
The important thing is to try to learn how to use it and to find what
you need because there may be a parameter that doesn't click with you
when you look at help the first time.
But maybe 6 months from now, you'll look at the help and go oh,
there's that parameter that I need. That will solve my problem,
and that's what happened to me. Only by looking at help again will
you be able to find what you need. I had a student tell we once in
the class that they were a little, you know,
put off by my drilling and insistence on them to read and use help.
But after the second day of class, he realized what I was trying to teach them.
He could see how it was affecting the other students
in the classroom and realized oh, now I get why this is so important.
He totally bought in.
And from there, it was a much easier classroom because he
got into the habit of reading the help. And that's what I hope you get into the habit to as well.