Alright, let's kind of recap what we looked at in this module.
The operators that we looked at are key elements of the PowerShell language.
These are things that you are going to have to know and
it will just become second nature.
The more you use PowerShell, the more you use these operators,
the easier that will be.
Be sure to grab the course downloads.
Now, even though I didn't do any live demo,
all of the demonstrations I had in my slides is in the download course files
so you can load it up and you can copy and paste and you can try these
commands for yourself so that you can see how they work.
I encourage you and stress the importance of understanding how
these things work interactively in the console.
Once you use them in the console and build up that muscle memory,
they'll become much easier to use when you get to scripting.
And keep in mind that many of these operators are designed
and were introduced to make it easier in longer pipelined or
complex pipelined expression,
but that does not mean you have to write things in
a complex pipeline expression.
You may find it easier to take a process that you want to do and break it
down into multiple steps so you have a bunch of single,
simple processes,
maybe saved results or variables and then reuse those
variables in a subsequent command.
However, if you need to do something that's a little more complicated,
these new operators or even any of the operators
should make that a little bit easier.
Keep in mind that when you get to PowerShell scripting,
even though you can use these operators,
especially some of the newer operators like the ternary operators,
you may find it easier to use scripting alternatives like an if else statement.
The ternary operator if else will ultimately do the same thing,
but looking at one in a piece of code or a script file may make more
sense to you and it may be clearer if you see if else in a script
file versus the cryptic ternary operator.
Personally,
I think the ternary operator is fine if I'm doing something
interactively in the console because I know what I'm typing.
If I'm writing a PowerShell script,
I'm going to continue to use if and else if for my expression
because I think that it's easier to understand.
Many of these operators, especially as you get more complex or start doing more,
for example, like with the logical operators,
it may not technically be required, but group with parentheses for clarity.
You need to make sure that you understand what you want PowerShell to do
because if you don't understand what you want PowerShell to do,
PowerShell won't be able to do what you want it to do.
Group with parentheses, and if you have a complex expression,
build it one little piece at a time so you can make sure that
you're getting the true/false or whatever the results that you
need before moving on to the next part.
And then lastly, if you haven't picked up on this already, please read the help.
All of the operators that I've talked about have documentation.
So search the about topics, read them, look at the help,
look at the examples in the cmdlets that might be using this operator.
I obviously can't teach you everything in this course.
The best that I can hope for is to give you an introduction,
show you what you can expect,
but I have to count on you to pick up the ball from the help
documentation and read it to reinforce these concepts that I'm
showing you and then doing it yourself,
so that's really the best way that you can learn.
Look at my examples, read the help,
and then do it yourself and then repeat this process.
The more and more that you do that,
the easier it will be for you to learn the PowerShell.
Alright, so I think we have probably really spun your head around in this module,
especially when we get to some of these later PowerShell 7 operators.
Please go out, get some fresh air, stretch your legs,
fill up your drinks, and then come back, and let's learn more about the PowerShell 7 language.