1
00:00:00,940 --> 00:00:04,980
One command you will use quite a bit in PowerShell is called Get‑Command.

2
00:00:04,980 --> 00:00:07,060
Now, nothing mysterious in that name.

3
00:00:07,060 --> 00:00:10,880
This cmdlet does one thing, which is reflected in the name, get

4
00:00:10,880 --> 00:00:13,540
me the commands in my PowerShell session.

5
00:00:13,540 --> 00:00:15,690
Now, if you run Get‑Command with no parameters,

6
00:00:15,690 --> 00:00:19,240
you'll see everything that PowerShell knows about.

7
00:00:19,240 --> 00:00:22,810
Or, you can use wildcards with the name of the thing you'd like to

8
00:00:22,810 --> 00:00:27,870
manage. In this example, I'm asking PowerShell to get me all the

9
00:00:27,870 --> 00:00:31,040
commands that have file somewhere in the name.

10
00:00:31,040 --> 00:00:33,900
Now, you don't have to concern yourself at this point with the version

11
00:00:33,900 --> 00:00:38,140
or source, just knowing the name is the key point.

12
00:00:38,140 --> 00:00:38,630
By the way,

13
00:00:38,630 --> 00:00:43,140
I should point out that technically you are using a parameter with Get‑Command.

14
00:00:43,140 --> 00:00:48,640
The parameter, ‑Name, is positional, meaning you don't have to type it.

15
00:00:48,640 --> 00:00:53,040
The *file* is technically that parameter value.

16
00:00:53,040 --> 00:00:57,020
Get‑Command has a few other explicit parameters, such as the type of a

17
00:00:57,020 --> 00:01:01,560
command. Type the parameter name, don't forget the dash followed by a space

18
00:01:01,560 --> 00:01:05,640
and the values, in this case function and cmdlet.

19
00:01:05,640 --> 00:01:08,600
Some commands have a way to auto complete possible values.

20
00:01:08,600 --> 00:01:10,080
This is one of them.

21
00:01:10,080 --> 00:01:14,000
After you hit the spacebar, after commandtype,

22
00:01:14,000 --> 00:01:17,400
you can press the Tab key and PowerShell will cycle

23
00:01:17,400 --> 00:01:19,640
through all the possible values.

24
00:01:19,640 --> 00:01:22,810
You don't really have to memorize a lot of things in PowerShell, just

25
00:01:22,810 --> 00:01:25,380
build up that muscle memory to use tab completion,

26
00:01:25,380 --> 00:01:26,610
or at least give it a try.

27
00:01:26,610 --> 00:01:29,710
It doesn't work all the time, but it doesn't hurt to try.

28
00:01:29,710 --> 00:01:33,440
You can also limit your command search by the noun.

29
00:01:33,440 --> 00:01:37,140
This requires that you type the ‑Noun parameter.

30
00:01:37,140 --> 00:01:40,710
You can use wildcards around the noun name if you aren't sure, and

31
00:01:40,710 --> 00:01:44,330
then find it from there based on the results that you get. And you

32
00:01:44,330 --> 00:01:50,000
can do the same thing with ‑Verb, or combine them. I'll show you how when we get to the demo.

