1
00:00:01,640 --> 00:00:03,000
With all of this in mind,

2
00:00:03,000 --> 00:00:06,470
let's jump into a PowerShell 7 session, and you'll see how

3
00:00:06,470 --> 00:00:11,240
easy it is to run and work with commands.

4
00:00:11,240 --> 00:00:13,040
All right, so I'm in Windows PowerShell,

5
00:00:13,040 --> 00:00:16,560
and I am using Windows Terminal just because I think that's

6
00:00:16,560 --> 00:00:19,540
the modern way to be using PowerShell.

7
00:00:19,540 --> 00:00:22,460
And for me, it's a nice, easier way to work.

8
00:00:22,460 --> 00:00:25,590
And just to show you, I'll show you the PSVersionTable,

9
00:00:25,590 --> 00:00:31,910
and I am running the latest version, 7.1.2, your version obviously may differ,

10
00:00:31,910 --> 00:00:37,370
and hopefully you are running at least this version of PowerShell to

11
00:00:37,370 --> 00:00:40,440
line up everything that I'm going to be showing you.

12
00:00:40,440 --> 00:00:44,700
So we'll start with Get‑Command. Get‑Command will show me all of

13
00:00:44,700 --> 00:00:48,540
the commands that are available on my system.

14
00:00:48,540 --> 00:00:51,450
Now you can see that scroll by there pretty quickly.

15
00:00:51,450 --> 00:00:56,640
I can refine this by doing Get‑Command and specify the command types,

16
00:00:56,640 --> 00:01:00,600
such as cmdlet and function. And in this case, this is pretty much

17
00:01:00,600 --> 00:01:05,080
going to give me the same. In Windows PowerShell, I believe the

18
00:01:05,080 --> 00:01:09,860
default gave you lots more information, and in PowerShell 7 they have

19
00:01:09,860 --> 00:01:14,030
kind of fine‑tuned that, but if you want to take real control over

20
00:01:14,030 --> 00:01:15,090
what shows up,

21
00:01:15,090 --> 00:01:19,120
you can use that command‑type parameter. So you can get a

22
00:01:19,120 --> 00:01:21,550
command even if you know part of the name.

23
00:01:21,550 --> 00:01:22,230
Like say, hey,

24
00:01:22,230 --> 00:01:26,370
I want to show all the commands that have disk in the name, so you can use the

25
00:01:26,370 --> 00:01:30,190
wildcard character. There you can see some applications.

26
00:01:30,190 --> 00:01:34,720
Those are the commands that are in the system path, programs, or applications,

27
00:01:34,720 --> 00:01:37,960
not necessarily PowerShell tools.

28
00:01:37,960 --> 00:01:42,360
So let's refine the command. Let's clear the screen here,

29
00:01:42,360 --> 00:01:45,060
and let's do Get‑Command, and again,

30
00:01:45,060 --> 00:01:51,040
just the disk commands, and I'll limit it to cmdlets and functions.

31
00:01:51,040 --> 00:01:53,700
Now my list gets a little bit shorter,

32
00:01:53,700 --> 00:01:59,090
and I can kind of continue to refine to find the command that I am looking for.

33
00:01:59,090 --> 00:02:04,320
Now, as I mentioned, commands follow a standard naming convention using verbs.

34
00:02:04,320 --> 00:02:07,590
We can get those verbs with the Get‑Verb cmdlet,

35
00:02:07,590 --> 00:02:11,540
and I'll pipe that to more because this is going to scroll a number of things.

36
00:02:11,540 --> 00:02:15,750
You can hit the Spacebar to go to the next page, Enter

37
00:02:15,750 --> 00:02:18,490
just goes one line, or Q to quit.

38
00:02:18,490 --> 00:02:21,630
I'm just going to quit out of that list. So you can see all

39
00:02:21,630 --> 00:02:23,730
of the verbs that are available to me.

40
00:02:23,730 --> 00:02:26,180
So let's say I want to find all the commands that have

41
00:02:26,180 --> 00:02:30,360
mount as the verb. Get‑Command ‑Verb Mount.

42
00:02:30,360 --> 00:02:30,970
Pretty cool.

43
00:02:30,970 --> 00:02:34,790
So there we go. So I can find what I'm looking for if I have

44
00:02:34,790 --> 00:02:38,630
an idea about the name or the verb. Like, I can do a similar

45
00:02:38,630 --> 00:02:40,470
thing, by the way, with the noun.

46
00:02:40,470 --> 00:02:43,500
If I say, now that I've looked through earlier, I saw,

47
00:02:43,500 --> 00:02:43,670
oh,

48
00:02:43,670 --> 00:02:46,110
disk image seems to be a noun, what are all the

49
00:02:46,110 --> 00:02:48,740
things that I can do with that noun?

50
00:02:48,740 --> 00:02:51,580
All right, so I can dismount, get, or mount.

51
00:02:51,580 --> 00:02:52,100
And this,

52
00:02:52,100 --> 00:02:56,460
too, will allow you to use wildcards. So I can say show me all of the ones

53
00:02:56,460 --> 00:02:59,380
where the noun starts with disk, so it will be DiskImage,

54
00:02:59,380 --> 00:03:00,480
and then whatever else.

55
00:03:00,480 --> 00:03:01,620
So there you go.

56
00:03:01,620 --> 00:03:09,000
So I've got DiskImage, I've got Disk, I've got DiskSNV, lots of other options there.

