Hello everyone, and welcome back.
This is the last module in our course on learning about the PowerShell language.
In this module, I want to talk about strings, dates, and numbers.
In other words,
I want to show you ways that you can work with some very common
object types to maybe go a little further than what you normally can
do or think you can do with PowerShell.
So when we work with PowerShell, we work with command lists and functions,
and this includes scripts and functions that you might write; however,
these commands don't do everything,
they can't handle every situation or provide every piece of
coverage that you might need in order to do your job.
For example, you may have some particular needs where you need to format,
manipulate, or in some other way process some piece of data.
It could be objects that you get from running a command,
say searching a SQL Server, or a SharePoint site,
or processing a log file, or processing 1000 log files.
Cmdlets will get you part of the way,
but you may need additional steps to get everything
done that you need to accomplish.
In other words, you may need to fill in some gaps.
The cmdlet will get you so far, but you need to do a little bit more.
Hey, how do I do that?
Well, that's why I want to show you,
or at least get you started thinking the right way,
so that you can figure out how to fill in these gaps.
The other reason that we're looking at this information in this module
is you may want to polish up a PowerShell expression,
again,
the cmdlet or PowerShell expression that you have built may give
you most of the information that you want,
but maybe it's not quite in the format that you need,
or you need another additional piece of information
that isn't part of the command, but you can provide it.
So these are things that we can do with PowerShell,
and to be honest with you,
these are the things that I find very exciting about PowerShell
because I have mastered the PowerShell language.
Once you get some more experience with the PowerShell language,
you will be able to do these things as well.
Very often the things that we want to manipulate,
or polish up, or work with further are things like dates,
or strings, or numbers.
These are types of objects that don't necessarily
have a built‑in library of commands, but there are ways that you can work with,
or manipulate, or whatever you need to do,
and I'm going to show you how we can do that when we get to the demonstration.
Remember, all of these things are objects,
dates, numbers, strings, so you can use Get‑Member to discover methods,
and properties, and things that you can use with those object types.
I'm going to encourage you to leverage the dotted notation.
Again, we're going to be working with objects,
objects have properties, that property may be a nested
array or in another nested object.
Remember, you can use that dotted notation and continue it on for
as long as you need. I'll show you some of this in the
demonstrations. And of course you want to take advantage of
PowerShell's operators that we looked at earlier in this course.
You want to maybe compare, and say hey,
does this string match this particular pattern, is this
number greater or equal to that number? So learn how to leverage the PowerShell operators.