1
00:00:01,110 --> 00:00:06,440
Let me begin with a brief overview of how PowerShell help works.

2
00:00:06,440 --> 00:00:10,390
All of the help files you need are packaged with PowerShell modules.

3
00:00:10,390 --> 00:00:14,570
Now a module is a self‑contained unit that includes related commands,

4
00:00:14,570 --> 00:00:17,140
formatting files, help, and other files.

5
00:00:17,140 --> 00:00:22,620
Now most help is package in an XML format called MAML, M‑A‑M‑L.

6
00:00:22,620 --> 00:00:25,220
Now I tell you that more is a way of background information.

7
00:00:25,220 --> 00:00:29,290
You won't need to manually do anything with these XML files.

8
00:00:29,290 --> 00:00:32,630
PowerShell itself ships with a number of modules,

9
00:00:32,630 --> 00:00:36,100
as well as other types of help files that we're going to look at later.

10
00:00:36,100 --> 00:00:39,500
Now the nice part is that you don't have to do anything.

11
00:00:39,500 --> 00:00:42,790
PowerShell automatically loads the modules and help files

12
00:00:42,790 --> 00:00:45,400
when you start using these commands.

13
00:00:45,400 --> 00:00:48,910
When you start a PowerShell session, you get a lot of them automatically,

14
00:00:48,910 --> 00:00:51,150
and help is included for you.

15
00:00:51,150 --> 00:00:53,900
All you need to do is use them.

16
00:00:53,900 --> 00:00:57,720
And you don't need any special software or apps.

17
00:00:57,720 --> 00:00:59,590
If you have a PowerShell prompt,

18
00:00:59,590 --> 00:01:04,290
you can find and get all the help you need with a few simple commands.

19
00:01:04,290 --> 00:01:09,670
In PowerShell, commands follow a very simple verb‑noun naming convention.

20
00:01:09,670 --> 00:01:13,860
The verb comes from a standard list and are actions that you do all the time,

21
00:01:13,860 --> 00:01:16,810
such as get, stop, start, remove.

22
00:01:16,810 --> 00:01:19,680
The noun is the singular version of the thing that you

23
00:01:19,680 --> 00:01:21,880
want to take an action on or with.

24
00:01:21,880 --> 00:01:25,840
So it shouldn't be too surprising that the command to Get‑Help information is,

25
00:01:25,840 --> 00:01:27,940
in fact, called Get‑Help.

26
00:01:27,940 --> 00:01:30,210
Now just remember the dash in the name.

27
00:01:30,210 --> 00:01:34,370
When referencing commands in PowerShell, we don't say Get dash Help typically.

28
00:01:34,370 --> 00:01:35,840
It's Get‑Help.

29
00:01:35,840 --> 00:01:37,050
The dash is implied.

30
00:01:37,050 --> 00:01:40,540
This is something that trips up a lot of people who are new to PowerShell.

31
00:01:40,540 --> 00:01:43,840
As you'll see when I get to the demo, most of the time,

32
00:01:43,840 --> 00:01:46,450
we're going to use a command called help.

33
00:01:46,450 --> 00:01:46,570
Now,

34
00:01:46,570 --> 00:01:49,250
this is really nothing more than a simple PowerShell function

35
00:01:49,250 --> 00:01:53,440
that wraps around the Get‑Help command, making it easier to use.

36
00:01:53,440 --> 00:01:56,940
Help and Get‑Help under the hood really do the same thing.

37
00:01:56,940 --> 00:01:59,780
The only difference is how they display the information.

38
00:01:59,780 --> 00:02:02,390
Again, you'll see this when I get to the demo.

39
00:02:02,390 --> 00:02:05,330
And if you're coming from the Linux world or just

40
00:02:05,330 --> 00:02:08,890
want to be a little bit different, you can use the alias man.

41
00:02:08,890 --> 00:02:11,610
Now it's important for you to understand though that this

42
00:02:11,610 --> 00:02:14,350
isn't running the Linux man command.

43
00:02:14,350 --> 00:02:18,190
This is simply an alternative way to run the help command.

44
00:02:18,190 --> 00:02:22,660
Even though I told you a few minutes ago that PowerShell ships with help files,

45
00:02:22,660 --> 00:02:24,860
this isn't entirely true.

46
00:02:24,860 --> 00:02:28,200
Microsoft ships with a subset of help content.

47
00:02:28,200 --> 00:02:30,040
Think of them as stubs.

48
00:02:30,040 --> 00:02:33,030
And while the help may not necessarily be complete,

49
00:02:33,030 --> 00:02:37,110
it does include enough information for more experienced users.

50
00:02:37,110 --> 00:02:40,680
Now I think Microsoft has a long‑term goal here to deliver more

51
00:02:40,680 --> 00:02:43,540
streamline products with the bare essentials,

52
00:02:43,540 --> 00:02:47,940
relying on you to add the other bits and pieces that you need or want.

53
00:02:47,940 --> 00:02:51,730
And you can think of PowerShell help as following this model.

54
00:02:51,730 --> 00:02:52,870
For example,

55
00:02:52,870 --> 00:02:55,490
because you shouldn't be logged on to servers that you

56
00:02:55,490 --> 00:02:59,670
actively lease on a regular basis, you really don't need the full,

57
00:02:59,670 --> 00:03:02,950
complete PowerShell help on those servers.

58
00:03:02,950 --> 00:03:07,600
Your management model should be to do everything you need from your desktop.

59
00:03:07,600 --> 00:03:09,410
That's where you want the full help.

60
00:03:09,410 --> 00:03:11,480
The help files don't have a huge footprint,

61
00:03:11,480 --> 00:03:13,640
but every little bit of savings helps.

62
00:03:13,640 --> 00:03:17,620
So there's really very little reason to update help on your servers.

63
00:03:17,620 --> 00:03:20,180
Do it on your desktop.

64
00:03:20,180 --> 00:03:23,260
Now what this means for you though is that on new Windows 10

65
00:03:23,260 --> 00:03:27,040
installations or new PowerShell 7 installs,

66
00:03:27,040 --> 00:03:31,140
you'll want to update the local help content.

67
00:03:31,140 --> 00:03:33,970
Now this isn't something you need to do all the time.

68
00:03:33,970 --> 00:03:36,450
There is no mechanism enforcement right now in PowerShell to

69
00:03:36,450 --> 00:03:39,080
let you know when help should be updated.

70
00:03:39,080 --> 00:03:42,410
Nothing to tell you that Microsoft has new help or a new

71
00:03:42,410 --> 00:03:44,540
package waiting for you to download,

72
00:03:44,540 --> 00:03:46,750
at least not at the time I'm doing this course.

73
00:03:46,750 --> 00:03:51,840
Personally, I update help once a month, really more out of habit than anything.

74
00:03:51,840 --> 00:03:55,360
You can decide how often or when you want to update help.

75
00:03:55,360 --> 00:03:58,260
I'll show you how to update and even to save help if

76
00:03:58,260 --> 00:03:59,970
you're working in a team environment.

77
00:03:59,970 --> 00:04:05,340
Now you may be wondering after all of this, why does all of this matter?

78
00:04:05,340 --> 00:04:09,700
And it matters because PowerShell is under active development.

79
00:04:09,700 --> 00:04:12,640
New releases are coming out a few times a year.

80
00:04:12,640 --> 00:04:15,670
With each new release, there may be new commands.

81
00:04:15,670 --> 00:04:17,270
There may be new parameters.

82
00:04:17,270 --> 00:04:20,990
Or sometimes parameters are deprecated or removed.

83
00:04:20,990 --> 00:04:25,190
The help should reflect those changes. PowerShell help may also be

84
00:04:25,190 --> 00:04:28,230
updated to correct mistakes or expand content.

85
00:04:28,230 --> 00:04:33,440
You have to get in the habit of reading help all the time and rereading it.

86
00:04:33,440 --> 00:04:37,040
Back in the V1 days, we had maybe a few hundred commands.

87
00:04:37,040 --> 00:04:41,380
Now I can learn help for a few hundred commands. However,

88
00:04:41,380 --> 00:04:45,680
on a new laptop installation I'm working on for another project, I did

89
00:04:45,680 --> 00:04:47,300
a quick look at the number of PowerShell commands,

90
00:04:47,300 --> 00:04:53,720
and there were over 1600. On my primary desktop, there were over 5,000 commands.

91
00:04:53,720 --> 00:04:57,890
Now there's no way I can learn and memorize and I doubt you can either.

92
00:04:57,890 --> 00:05:03,280
So I have to rely on the help documentation. When I teach live classes, I stress

93
00:05:03,280 --> 00:05:07,260
the importance of reading the help. I tell students I'll help them with these

94
00:05:07,260 --> 00:05:10,640
exercises provided they have read the help first.

95
00:05:10,640 --> 00:05:14,360
Inevitably, I'll have a student that will ask for help on a problem,

96
00:05:14,360 --> 00:05:17,240
and I'll come over and I'll ask hey, did you read the help?

97
00:05:17,240 --> 00:05:19,420
And of course, they'll say no, sorry,

98
00:05:19,420 --> 00:05:22,300
I didn't didn't read the help. So I have them read

99
00:05:22,300 --> 00:05:25,310
the help, and more often than not, once they read the help,

100
00:05:25,310 --> 00:05:28,730
they can complete the exercise because they find the answer that I

101
00:05:28,730 --> 00:05:32,220
am hoping they would find by reading the help.

102
00:05:32,220 --> 00:05:36,020
Now personally, I've run into this same situation.

103
00:05:36,020 --> 00:05:37,040
I remember, you know,

104
00:05:37,040 --> 00:05:40,820
awhile ago banging my head trying to get a piece of code to work using a

105
00:05:40,820 --> 00:05:45,320
command that I thought I knew, a command that I'd used for years.

106
00:05:45,320 --> 00:05:45,610
Fine.

107
00:05:45,610 --> 00:05:47,330
I couldn't get it to work.

108
00:05:47,330 --> 00:05:50,740
So I went back and decided I'm going to go back and look at the help.

109
00:05:50,740 --> 00:05:53,710
And there was, it just slapped me right in the face.

110
00:05:53,710 --> 00:05:57,730
There was a parameter that was added at some point to the command

111
00:05:57,730 --> 00:06:01,980
that I missed or never realized was there. Maybe it was there all

112
00:06:01,980 --> 00:06:04,990
along, and I just never realized it.

113
00:06:04,990 --> 00:06:08,310
As you'll see, the help content can be overwhelming,

114
00:06:08,310 --> 00:06:10,910
and so don't even try to memorize it.

115
00:06:10,910 --> 00:06:14,380
The important thing is to try to learn how to use it and to find what

116
00:06:14,380 --> 00:06:17,670
you need because there may be a parameter that doesn't click with you

117
00:06:17,670 --> 00:06:20,020
when you look at help the first time.

118
00:06:20,020 --> 00:06:23,930
But maybe 6 months from now, you'll look at the help and go oh,

119
00:06:23,930 --> 00:06:26,740
there's that parameter that I need. That will solve my problem,

120
00:06:26,740 --> 00:06:30,540
and that's what happened to me. Only by looking at help again will

121
00:06:30,540 --> 00:06:33,740
you be able to find what you need. I had a student tell we once in

122
00:06:33,740 --> 00:06:35,440
the class that they were a little, you know,

123
00:06:35,440 --> 00:06:40,410
put off by my drilling and insistence on them to read and use help.

124
00:06:40,410 --> 00:06:44,720
But after the second day of class, he realized what I was trying to teach them.

125
00:06:44,720 --> 00:06:47,940
He could see how it was affecting the other students

126
00:06:47,940 --> 00:06:51,090
in the classroom and realized oh, now I get why this is so important.

127
00:06:51,090 --> 00:06:52,340
He totally bought in.

128
00:06:52,340 --> 00:06:55,740
And from there, it was a much easier classroom because he

129
00:06:55,740 --> 00:07:02,000
got into the habit of reading the help. And that's what I hope you get into the habit to as well.

