1
00:00:01,040 --> 00:00:03,140
Hello everyone, and welcome back.

2
00:00:03,140 --> 00:00:08,160
This is the last module in our course on learning about the PowerShell language.

3
00:00:08,160 --> 00:00:11,940
In this module, I want to talk about strings, dates, and numbers.

4
00:00:11,940 --> 00:00:12,420
In other words,

5
00:00:12,420 --> 00:00:15,500
I want to show you ways that you can work with some very common

6
00:00:15,500 --> 00:00:19,010
object types to maybe go a little further than what you normally can

7
00:00:19,010 --> 00:00:21,310
do or think you can do with PowerShell.

8
00:00:21,310 --> 00:00:26,740
So when we work with PowerShell, we work with command lists and functions,

9
00:00:26,740 --> 00:00:30,010
and this includes scripts and functions that you might write; however,

10
00:00:30,010 --> 00:00:32,120
these commands don't do everything,

11
00:00:32,120 --> 00:00:35,610
they can't handle every situation or provide every piece of

12
00:00:35,610 --> 00:00:38,740
coverage that you might need in order to do your job.

13
00:00:38,740 --> 00:00:42,520
For example, you may have some particular needs where you need to format,

14
00:00:42,520 --> 00:00:46,940
manipulate, or in some other way process some piece of data.

15
00:00:46,940 --> 00:00:49,850
It could be objects that you get from running a command,

16
00:00:49,850 --> 00:00:53,140
say searching a SQL Server, or a SharePoint site,

17
00:00:53,140 --> 00:00:58,040
or processing a log file, or processing 1000 log files.

18
00:00:58,040 --> 00:01:00,050
Cmdlets will get you part of the way,

19
00:01:00,050 --> 00:01:02,550
but you may need additional steps to get everything

20
00:01:02,550 --> 00:01:04,540
done that you need to accomplish.

21
00:01:04,540 --> 00:01:07,160
In other words, you may need to fill in some gaps.

22
00:01:07,160 --> 00:01:11,190
The cmdlet will get you so far, but you need to do a little bit more.

23
00:01:11,190 --> 00:01:12,540
Hey, how do I do that?

24
00:01:12,540 --> 00:01:13,920
Well, that's why I want to show you,

25
00:01:13,920 --> 00:01:16,790
or at least get you started thinking the right way,

26
00:01:16,790 --> 00:01:20,010
so that you can figure out how to fill in these gaps.

27
00:01:20,010 --> 00:01:23,500
The other reason that we're looking at this information in this module

28
00:01:23,500 --> 00:01:26,460
is you may want to polish up a PowerShell expression,

29
00:01:26,460 --> 00:01:27,240
again,

30
00:01:27,240 --> 00:01:30,410
the cmdlet or PowerShell expression that you have built may give

31
00:01:30,410 --> 00:01:32,400
you most of the information that you want,

32
00:01:32,400 --> 00:01:34,760
but maybe it's not quite in the format that you need,

33
00:01:34,760 --> 00:01:37,230
or you need another additional piece of information

34
00:01:37,230 --> 00:01:40,110
that isn't part of the command, but you can provide it.

35
00:01:40,110 --> 00:01:42,270
So these are things that we can do with PowerShell,

36
00:01:42,270 --> 00:01:43,650
and to be honest with you,

37
00:01:43,650 --> 00:01:46,360
these are the things that I find very exciting about PowerShell

38
00:01:46,360 --> 00:01:48,620
because I have mastered the PowerShell language.

39
00:01:48,620 --> 00:01:50,950
Once you get some more experience with the PowerShell language,

40
00:01:50,950 --> 00:01:52,830
you will be able to do these things as well.

41
00:01:52,830 --> 00:01:55,350
Very often the things that we want to manipulate,

42
00:01:55,350 --> 00:01:59,160
or polish up, or work with further are things like dates,

43
00:01:59,160 --> 00:02:01,350
or strings, or numbers.

44
00:02:01,350 --> 00:02:03,580
These are types of objects that don't necessarily

45
00:02:03,580 --> 00:02:08,480
have a built‑in library of commands, but there are ways that you can work with,

46
00:02:08,480 --> 00:02:10,640
or manipulate, or whatever you need to do,

47
00:02:10,640 --> 00:02:14,300
and I'm going to show you how we can do that when we get to the demonstration.

48
00:02:14,300 --> 00:02:16,740
Remember, all of these things are objects,

49
00:02:16,740 --> 00:02:22,260
dates, numbers, strings, so you can use Get‑Member to discover methods,

50
00:02:22,260 --> 00:02:26,640
and properties, and things that you can use with those object types.

51
00:02:26,640 --> 00:02:29,940
I'm going to encourage you to leverage the dotted notation.

52
00:02:29,940 --> 00:02:31,930
Again, we're going to be working with objects,

53
00:02:31,930 --> 00:02:35,190
objects have properties, that property may be a nested

54
00:02:35,190 --> 00:02:37,940
array or in another nested object.

55
00:02:37,940 --> 00:02:41,510
Remember, you can use that dotted notation and continue it on for

56
00:02:41,510 --> 00:02:44,250
as long as you need. I'll show you some of this in the

57
00:02:44,250 --> 00:02:47,830
demonstrations. And of course you want to take advantage of

58
00:02:47,830 --> 00:02:50,610
PowerShell's operators that we looked at earlier in this course.

59
00:02:50,610 --> 00:02:52,870
You want to maybe compare, and say hey,

60
00:02:52,870 --> 00:02:56,370
does this string match this particular pattern, is this

61
00:02:56,370 --> 00:03:04,000
number greater or equal to that number? So learn how to leverage the PowerShell operators.

