1
00:00:01,040 --> 00:00:04,930
Now that we have help installed, let me show you how to use it.

2
00:00:04,930 --> 00:00:08,140
It's actually really quite easy. You can just type the word help

3
00:00:08,140 --> 00:00:11,000
and then whatever it is you want to find help on.

4
00:00:11,000 --> 00:00:14,740
Tell me everything you know PowerShell. Give me some help on everything that has

5
00:00:14,740 --> 00:00:22,570
process in the name. So I can do help *process*. Okay, not too bad. I can see a

6
00:00:22,570 --> 00:00:26,880
list there. Looking at the list, I can then fine tune that. Maybe I just want to

7
00:00:26,880 --> 00:00:31,510
do help *process, so I don't want anything that has something after process.

8
00:00:31,510 --> 00:00:36,800
Narrows it down a bit more, and I can see, oh, there's some Get‑Process,

9
00:00:36,800 --> 00:00:39,270
Stop‑Process, Wait‑Process.

10
00:00:39,270 --> 00:00:43,020
So let's look at another way, and that is using get‑command.

11
00:00:43,020 --> 00:00:48,470
Get‑command has a ‑noun parameter, so I can say, hey,

12
00:00:48,470 --> 00:00:55,100
find all the commands that have a noun of process, simplifies it even further.

13
00:00:55,100 --> 00:00:57,930
So you can find commands or discover things by how they're

14
00:00:57,930 --> 00:01:00,730
using the help system or get‑command.

15
00:01:00,730 --> 00:01:01,040
Of course,

16
00:01:01,040 --> 00:01:04,920
once you find the command, like say Stop‑Process you want to know, hey,

17
00:01:04,920 --> 00:01:08,460
how do I use this command? Now you can do help. Here I'm going to use

18
00:01:08,460 --> 00:01:13,190
get‑help. Again, I want to demonstrate that when you do this this scrolls

19
00:01:13,190 --> 00:01:21,890
all the way through versus if I run help stop‑process, this does the

20
00:01:21,890 --> 00:01:25,290
paging. So I kind of am in the habit, and I expect you'll get in the

21
00:01:25,290 --> 00:01:27,230
habit of using the help command.

22
00:01:27,230 --> 00:01:31,850
It's the same content. Only difference really between help and get‑help is that

23
00:01:31,850 --> 00:01:35,800
help pipes it to the more command automatically for you so you don't have to do

24
00:01:35,800 --> 00:01:41,810
anything other than kind of page through and look at the help that you need.

25
00:01:41,810 --> 00:01:45,180
So, let's clear the screen here. So we've got get‑help or the help command.

26
00:01:45,180 --> 00:01:48,540
Help is the easier way to go.

27
00:01:48,540 --> 00:01:52,740
You can also get help from an alias.

28
00:01:52,740 --> 00:01:53,480
Or you might say,

29
00:01:53,480 --> 00:01:57,620
what is the PowerShell help for the dir command? So you do help dir,

30
00:01:57,620 --> 00:02:01,850
even though you may not know what the PowerShell command is. PowerShell

31
00:02:01,850 --> 00:02:05,280
will resolve the alias, and you can see, oh,

32
00:02:05,280 --> 00:02:07,370
the command is actually Get‑ChildItem.

33
00:02:07,370 --> 00:02:11,950
So now I can go through and I could look at all the help for Get‑ChildItem,

34
00:02:11,950 --> 00:02:16,780
and that would be the same thing as dir. Or this happens a lot, because

35
00:02:16,780 --> 00:02:20,250
you'll see some code on the internet or someplace, and you'll see someone

36
00:02:20,250 --> 00:02:23,220
with a command called gsv and wonder, well,

37
00:02:23,220 --> 00:02:25,570
I don't know what that is, so just asked for help.

38
00:02:25,570 --> 00:02:28,420
So do help gsv and see, oh,

39
00:02:28,420 --> 00:02:31,400
that's Get‑Service. It would certainly be nicer if they just typed out

40
00:02:31,400 --> 00:02:34,550
Get‑Service, but sometimes people will use aliases,

41
00:02:34,550 --> 00:02:38,060
and that's, that's an okay sort of thing to do, but you can use

42
00:02:38,060 --> 00:02:41,690
help to discover what the actual commands are and then how to use

43
00:02:41,690 --> 00:02:45,640
that command, in this case via its alias.

44
00:02:45,640 --> 00:02:47,600
If you're on a Windows machine,

45
00:02:47,600 --> 00:02:50,920
you can actually look for another alias, man. On the

46
00:02:50,920 --> 00:02:54,410
Linux system, man, is how we get help,.

47
00:02:54,410 --> 00:03:01,000
Um, so that's kind of cool. In fact, here, look at this. I can do man man, so I get help on help.

