1
00:00:01,100 --> 00:00:04,290
Continuing with this idea of standardization,

2
00:00:04,290 --> 00:00:08,140
cmdlets and functions are supposed to follow a standard naming convention,

3
00:00:08,140 --> 00:00:13,870
a Verb‑Noun. This makes it easy to identify a PowerShell command and

4
00:00:13,870 --> 00:00:16,350
have a pretty good idea of what it's going to do.

5
00:00:16,350 --> 00:00:19,170
There's nothing cryptic here like ack or set.

6
00:00:19,170 --> 00:00:24,140
The verb comes from a list of standard .NET verbs. You can use to

7
00:00:24,140 --> 00:00:27,140
Get‑Verb command in PowerShell to see that list.

8
00:00:27,140 --> 00:00:30,320
But most of them are plain English and are things like Get, Set,

9
00:00:30,320 --> 00:00:34,240
Stop, Start, Remove, nothing really too confusing.

10
00:00:34,240 --> 00:00:36,600
The noun is the singular version,

11
00:00:36,600 --> 00:00:40,120
the thing you are working with, Service, Process, Hotfix,

12
00:00:40,120 --> 00:00:44,460
for example. Although you may see some commands with a prefix before the

13
00:00:44,460 --> 00:00:48,880
noun. This is primarily done to prevent naming collisions and also help

14
00:00:48,880 --> 00:00:51,340
you identify where the command comes from.

15
00:00:51,340 --> 00:00:51,930
For example,

16
00:00:51,930 --> 00:00:55,410
the Active Directory commands are like Get‑ADUser and

17
00:00:55,410 --> 00:00:58,900
Get‑ADGroup. AD has been added to help you identify what

18
00:00:58,900 --> 00:01:01,540
specific type of user or group.

19
00:01:01,540 --> 00:01:02,870
Here are some good examples.

20
00:01:02,870 --> 00:01:03,930
Now if you read English,

21
00:01:03,930 --> 00:01:08,440
you can obviously tell what these commands are going to do.

22
00:01:08,440 --> 00:01:13,080
One thing though, don't forget that dash. PowerShell people often talk about

23
00:01:13,080 --> 00:01:17,720
Get‑Service and Stop‑Service, we never say Get dash Service.

24
00:01:17,720 --> 00:01:19,200
The dash is implied.

25
00:01:19,200 --> 00:01:22,820
I've had plenty of beginner students in classes who are applying what I'm

26
00:01:22,820 --> 00:01:26,340
saying literally and then wonder why they get errors.

27
00:01:26,340 --> 00:01:29,440
Remember that dash. Here's another example.

28
00:01:29,440 --> 00:01:32,240
Got any idea what these commands are going to do?

29
00:01:32,240 --> 00:01:36,640
And many times you can combine these commands in a PowerShell expression.

30
00:01:36,640 --> 00:01:41,090
I find that if you can visualize or verbalize what it is that you want to do,

31
00:01:41,090 --> 00:01:43,380
it really isn't that much of a stretch to find the right

32
00:01:43,380 --> 00:01:48,040
commands. Get the Notepad process and then stop it.

33
00:01:48,040 --> 00:01:50,670
Sure, you'll need to fine tune with parameters,

34
00:01:50,670 --> 00:01:56,000
but at least you have a good idea about what commands you're going to need to use.

