1
00:00:01,640 --> 00:00:06,530
Alright, let's kind of recap what we looked at in this module.

2
00:00:06,530 --> 00:00:10,940
The operators that we looked at are key elements of the PowerShell language.

3
00:00:10,940 --> 00:00:13,800
These are things that you are going to have to know and

4
00:00:13,800 --> 00:00:15,810
it will just become second nature.

5
00:00:15,810 --> 00:00:18,650
The more you use PowerShell, the more you use these operators,

6
00:00:18,650 --> 00:00:20,440
the easier that will be.

7
00:00:20,440 --> 00:00:22,500
Be sure to grab the course downloads.

8
00:00:22,500 --> 00:00:24,790
Now, even though I didn't do any live demo,

9
00:00:24,790 --> 00:00:29,420
all of the demonstrations I had in my slides is in the download course files

10
00:00:29,420 --> 00:00:32,760
so you can load it up and you can copy and paste and you can try these

11
00:00:32,760 --> 00:00:36,940
commands for yourself so that you can see how they work.

12
00:00:36,940 --> 00:00:40,920
I encourage you and stress the importance of understanding how

13
00:00:40,920 --> 00:00:44,540
these things work interactively in the console.

14
00:00:44,540 --> 00:00:48,670
Once you use them in the console and build up that muscle memory,

15
00:00:48,670 --> 00:00:52,240
they'll become much easier to use when you get to scripting.

16
00:00:52,240 --> 00:00:55,080
And keep in mind that many of these operators are designed

17
00:00:55,080 --> 00:00:59,110
and were introduced to make it easier in longer pipelined or

18
00:00:59,110 --> 00:01:01,240
complex pipelined expression,

19
00:01:01,240 --> 00:01:03,480
but that does not mean you have to write things in

20
00:01:03,480 --> 00:01:05,740
a complex pipeline expression.

21
00:01:05,740 --> 00:01:09,540
You may find it easier to take a process that you want to do and break it

22
00:01:09,540 --> 00:01:12,830
down into multiple steps so you have a bunch of single,

23
00:01:12,830 --> 00:01:14,220
simple processes,

24
00:01:14,220 --> 00:01:17,740
maybe saved results or variables and then reuse those

25
00:01:17,740 --> 00:01:20,740
variables in a subsequent command.

26
00:01:20,740 --> 00:01:24,330
However, if you need to do something that's a little more complicated,

27
00:01:24,330 --> 00:01:26,700
these new operators or even any of the operators

28
00:01:26,700 --> 00:01:28,930
should make that a little bit easier.

29
00:01:28,930 --> 00:01:31,730
Keep in mind that when you get to PowerShell scripting,

30
00:01:31,730 --> 00:01:34,390
even though you can use these operators,

31
00:01:34,390 --> 00:01:37,740
especially some of the newer operators like the ternary operators,

32
00:01:37,740 --> 00:01:43,840
you may find it easier to use scripting alternatives like an if else statement.

33
00:01:43,840 --> 00:01:47,370
The ternary operator if else will ultimately do the same thing,

34
00:01:47,370 --> 00:01:51,750
but looking at one in a piece of code or a script file may make more

35
00:01:51,750 --> 00:01:56,030
sense to you and it may be clearer if you see if else in a script

36
00:01:56,030 --> 00:01:58,960
file versus the cryptic ternary operator.

37
00:01:58,960 --> 00:01:59,490
Personally,

38
00:01:59,490 --> 00:02:02,930
I think the ternary operator is fine if I'm doing something

39
00:02:02,930 --> 00:02:05,940
interactively in the console because I know what I'm typing.

40
00:02:05,940 --> 00:02:07,450
If I'm writing a PowerShell script,

41
00:02:07,450 --> 00:02:11,950
I'm going to continue to use if and else if for my expression

42
00:02:11,950 --> 00:02:15,040
because I think that it's easier to understand.

43
00:02:15,040 --> 00:02:19,440
Many of these operators, especially as you get more complex or start doing more,

44
00:02:19,440 --> 00:02:22,040
for example, like with the logical operators,

45
00:02:22,040 --> 00:02:27,200
it may not technically be required, but group with parentheses for clarity.

46
00:02:27,200 --> 00:02:31,430
You need to make sure that you understand what you want PowerShell to do

47
00:02:31,430 --> 00:02:33,980
because if you don't understand what you want PowerShell to do,

48
00:02:33,980 --> 00:02:36,860
PowerShell won't be able to do what you want it to do.

49
00:02:36,860 --> 00:02:40,640
Group with parentheses, and if you have a complex expression,

50
00:02:40,640 --> 00:02:44,040
build it one little piece at a time so you can make sure that

51
00:02:44,040 --> 00:02:47,500
you're getting the true/false or whatever the results that you

52
00:02:47,500 --> 00:02:50,540
need before moving on to the next part.

53
00:02:50,540 --> 00:02:55,060
And then lastly, if you haven't picked up on this already, please read the help.

54
00:02:55,060 --> 00:02:58,950
All of the operators that I've talked about have documentation.

55
00:02:58,950 --> 00:03:02,840
So search the about topics, read them, look at the help,

56
00:03:02,840 --> 00:03:07,140
look at the examples in the cmdlets that might be using this operator.

57
00:03:07,140 --> 00:03:09,570
I obviously can't teach you everything in this course.

58
00:03:09,570 --> 00:03:13,090
The best that I can hope for is to give you an introduction,

59
00:03:13,090 --> 00:03:15,240
show you what you can expect,

60
00:03:15,240 --> 00:03:18,880
but I have to count on you to pick up the ball from the help

61
00:03:18,880 --> 00:03:23,080
documentation and read it to reinforce these concepts that I'm

62
00:03:23,080 --> 00:03:26,440
showing you and then doing it yourself,

63
00:03:26,440 --> 00:03:29,340
so that's really the best way that you can learn.

64
00:03:29,340 --> 00:03:32,020
Look at my examples, read the help,

65
00:03:32,020 --> 00:03:36,150
and then do it yourself and then repeat this process.

66
00:03:36,150 --> 00:03:38,170
The more and more that you do that,

67
00:03:38,170 --> 00:03:42,040
the easier it will be for you to learn the PowerShell.

68
00:03:42,040 --> 00:03:47,380
Alright, so I think we have probably really spun your head around in this module,

69
00:03:47,380 --> 00:03:50,670
especially when we get to some of these later PowerShell 7 operators.

70
00:03:50,670 --> 00:03:53,940
Please go out, get some fresh air, stretch your legs,

71
00:03:53,940 --> 00:04:00,000
fill up your drinks, and then come back, and let's learn more about the PowerShell 7 language.

