1
00:00:01,940 --> 00:00:04,140
With all of that as a way of introduction,

2
00:00:04,140 --> 00:00:06,070
let me jump into PowerShell,

3
00:00:06,070 --> 00:00:11,100
and let me give you some demonstrations on how you can work with objects.

4
00:00:11,100 --> 00:00:12,570
Normally,

5
00:00:12,570 --> 00:00:15,410
PowerShell is pretty good about figuring out the types of things

6
00:00:15,410 --> 00:00:18,740
that you are working with in the console; however,

7
00:00:18,740 --> 00:00:21,040
sometimes you need to give it a little help.

8
00:00:21,040 --> 00:00:22,410
Let me demonstrate that.

9
00:00:22,410 --> 00:00:24,220
Let me create a variable, $d,

10
00:00:24,220 --> 00:00:27,740
and give it a string value that kind of looks like a date.

11
00:00:27,740 --> 00:00:32,140
In fact, if I look at $d, I may think, oh that's a date,

12
00:00:32,140 --> 00:00:35,030
but if I try to do something with it, thinking it's a date,

13
00:00:35,030 --> 00:00:38,040
like subtract the current date from that date,

14
00:00:38,040 --> 00:00:39,830
I get an error because it says, hey,

15
00:00:39,830 --> 00:00:43,940
I can't do that because that is not the correct format.

16
00:00:43,940 --> 00:00:48,260
So the first thing to do is find out what type of object is $d,

17
00:00:48,260 --> 00:00:49,940
what does PowerShell think?

18
00:00:49,940 --> 00:00:55,230
And PowerShell tells me that this is a System.String object,

19
00:00:55,230 --> 00:00:57,040
so this is a piece of text.

20
00:00:57,040 --> 00:00:58,330
You can see there are lots of methods,

21
00:00:58,330 --> 00:01:01,140
we're going to talk about strings in the next module,

22
00:01:01,140 --> 00:01:04,550
and only one property of Length.

23
00:01:04,550 --> 00:01:09,340
All right, so I can't really work with this as a date because it's a string.

24
00:01:09,340 --> 00:01:13,140
Well, that's not totally true.

25
00:01:13,140 --> 00:01:21,440
I can recreate $d, and specifically say create this as a datetime object.

26
00:01:21,440 --> 00:01:26,180
And now if I do my operation of taking $d and subtracting the current datetime,

27
00:01:26,180 --> 00:01:30,440
now I get the time span object that I am expecting.

28
00:01:30,440 --> 00:01:32,980
PowerShell also has some operators that we can use that

29
00:01:32,980 --> 00:01:35,640
will make this process even easier.

30
00:01:35,640 --> 00:01:39,740
I'm going to create $i and give it a value of 10.

31
00:01:39,740 --> 00:01:43,840
Now I might try to multiply $i by itself,

32
00:01:43,840 --> 00:01:46,130
and that's not what I'm probably expecting.

33
00:01:46,130 --> 00:01:49,140
I'm expecting a result of 100, which is 10 times 10,

34
00:01:49,140 --> 00:01:53,140
but instead what I got was the string 10,

35
00:01:53,140 --> 00:01:55,840
10 times, all strung together.

36
00:01:55,840 --> 00:01:59,090
When you encounter things like this, that is your clue that,

37
00:01:59,090 --> 00:02:01,440
he,y something is not of the right type.

38
00:02:01,440 --> 00:02:05,240
You can have PowerShell tell you if it's the right type.

39
00:02:05,240 --> 00:02:09,740
So I can say, hey, is $i an int32?

40
00:02:09,740 --> 00:02:11,520
No, it's not.

41
00:02:11,520 --> 00:02:15,100
Then I can say is $i a string, and yes it is.

42
00:02:15,100 --> 00:02:18,200
So you can use the different system types,

43
00:02:18,200 --> 00:02:19,530
put them in square brackets,

44
00:02:19,530 --> 00:02:23,290
and then the is operator will tell you either true or false

45
00:02:23,290 --> 00:02:26,640
if the object is of that specific type.

46
00:02:26,640 --> 00:02:29,150
The next thing that you can do then is tell PowerShell,

47
00:02:29,150 --> 00:02:31,810
hey, even though this may not be that particular type,

48
00:02:31,810 --> 00:02:35,540
see if you can treat it as a particular type.

49
00:02:35,540 --> 00:02:40,540
So I can say, hey, take $i and treat it as an int32,

50
00:02:40,540 --> 00:02:43,340
and then that writes that value to the pipeline.

51
00:02:43,340 --> 00:02:47,040
This means that I can create an expression like this

52
00:02:47,040 --> 00:02:50,490
where I can take $i as an integer, in parentheses,

53
00:02:50,490 --> 00:02:54,740
and then multiply it by 3, and now I get the result that I expect.

54
00:02:54,740 --> 00:02:59,470
This does not change the value of $i, it is still a string of 10,

55
00:02:59,470 --> 00:03:03,840
but at least for this one moment I was able to temporarily tell PowerShell,

56
00:03:03,840 --> 00:03:09,140
hey, treat this as an integer and do your thing.

57
00:03:09,140 --> 00:03:12,490
You can also create things such as version numbers, for example.

58
00:03:12,490 --> 00:03:17,080
Here I can take a string and say treat this as a version type,

59
00:03:17,080 --> 00:03:19,640
and that's the type of object that you get,

60
00:03:19,640 --> 00:03:24,440
or knowing that that's version, you can say I want to create a variable $v,

61
00:03:24,440 --> 00:03:28,130
make it a version, and then give it the string,

62
00:03:28,130 --> 00:03:31,530
and PowerShell can convert the string to a version,

63
00:03:31,530 --> 00:03:36,840
and now $v again looks like the proper version object.

64
00:03:36,840 --> 00:03:40,340
Let's go back and look at that date example we started with.

65
00:03:40,340 --> 00:03:49,230
I'm going to remove the variable $d, and I'll reassign $d to that string.

66
00:03:49,230 --> 00:03:55,310
Now I can do the $d as datetime, and then subtract the current date and time,

67
00:03:55,310 --> 00:03:58,340
and again I get my time span.

68
00:03:58,340 --> 00:04:02,190
Sometimes you're working with variables and you may need them to be one type,

69
00:04:02,190 --> 00:04:05,060
but maybe you need an operation where they temporarily

70
00:04:05,060 --> 00:04:06,990
need to be treated as another type.

71
00:04:06,990 --> 00:04:10,140
The as operator, it's kind of helpful for that.

72
00:04:10,140 --> 00:04:13,420
Let me give you a little .NET trick that you can use in place of

73
00:04:13,420 --> 00:04:17,640
running Get‑Member to check the object type.

74
00:04:17,640 --> 00:04:20,960
Let's take $d, right, so we can see what it looks like.

75
00:04:20,960 --> 00:04:24,840
Is it a date, is it a string?

76
00:04:24,840 --> 00:04:28,120
All objects have a GetType method.

77
00:04:28,120 --> 00:04:30,440
This comes from the .NET Framework.

78
00:04:30,440 --> 00:04:33,740
This writes another type of object to the pipeline,

79
00:04:33,740 --> 00:04:36,940
and you can see the properties listed there.

80
00:04:36,940 --> 00:04:38,620
Using the object notation,

81
00:04:38,620 --> 00:04:41,940
which we're going to dig into a little bit deeper in a moment,

82
00:04:41,940 --> 00:04:47,240
I can say get the type object, and then give me the name property.

83
00:04:47,240 --> 00:04:51,240
So I can see very quickly that $d is a string.

84
00:04:51,240 --> 00:04:54,520
Sometimes this is faster than piping something to Get‑Member when

85
00:04:54,520 --> 00:04:58,840
all you really care about is the type name.

86
00:04:58,840 --> 00:05:02,940
So because I mentioned dotted notation, let's look at this a little bit deeper.

87
00:05:02,940 --> 00:05:08,240
I'm going to create a variable $p, and let's get the current PowerShell process.

88
00:05:08,240 --> 00:05:11,670
All right, so I can see then the default output,

89
00:05:11,670 --> 00:05:14,140
and I can see the property names.

90
00:05:14,140 --> 00:05:18,950
Those are not though all of the properties of this particular type of object.

91
00:05:18,950 --> 00:05:26,390
Type $p to Get‑Member, and I'm going to limit this to just the properties.

92
00:05:26,390 --> 00:05:32,270
All of these properties that you see are available for you to use.

93
00:05:32,270 --> 00:05:34,980
Now let me point out a few things here on the properties.

94
00:05:34,980 --> 00:05:39,850
You will see properties that are listed just there as properties like,

95
00:05:39,850 --> 00:05:42,340
BaseProperty, container, and so on.

96
00:05:42,340 --> 00:05:46,940
These are all properties that are part of the .NET object,

97
00:05:46,940 --> 00:05:48,970
and that is the type name that you see there,

98
00:05:48,970 --> 00:05:51,260
our System.Diagnostics.Process.

99
00:05:51,260 --> 00:05:55,240
If you were to take that type name and do a search on it,

100
00:05:55,240 --> 00:05:58,770
you'll end up at the MSDN, or the Microsoft documentation,

101
00:05:58,770 --> 00:06:02,640
and you'll see all these properties defined.

102
00:06:02,640 --> 00:06:03,560
PowerShell, though,

103
00:06:03,560 --> 00:06:07,430
wants to help you as an IT pro do more with PowerShell and

104
00:06:07,430 --> 00:06:10,090
not force you to know the .NET Framework.

105
00:06:10,090 --> 00:06:15,140
So many times they will do things such as adding alias properties,

106
00:06:15,140 --> 00:06:19,440
so that you don't have to know the actual .NET,

107
00:06:19,440 --> 00:06:21,610
you know, the C# code property name,

108
00:06:21,610 --> 00:06:25,410
you can reference something that maybe makes more sense to you,

109
00:06:25,410 --> 00:06:30,010
or they add shortcuts, so instead of having the type PageMemorySize64,

110
00:06:30,010 --> 00:06:34,530
you can just use PM as a property name.

111
00:06:34,530 --> 00:06:37,930
You'll also see, let me scroll down to the bottom here,

112
00:06:37,930 --> 00:06:41,020
many times PowerShell will add script properties.

113
00:06:41,020 --> 00:06:46,740
These are custom properties that are created on the fly by using .NET code.

114
00:06:46,740 --> 00:06:50,740
You'll also see in some cases there might be something called a property set,

115
00:06:50,740 --> 00:06:53,840
which is a group of properties as well.

116
00:06:53,840 --> 00:06:58,620
So you can use all of these properties in any cmdlet that needs a

117
00:06:58,620 --> 00:07:01,610
property name or does something with the property name,

118
00:07:01,610 --> 00:07:04,910
and we can reference these properties when we're working with an object

119
00:07:04,910 --> 00:07:08,200
like I'm doing now with $p with the dot notation.

120
00:07:08,200 --> 00:07:11,080
So, if I want to see just the process ID,

121
00:07:11,080 --> 00:07:16,480
and here I'm using the alias id, I get the process ID of 6044,

122
00:07:16,480 --> 00:07:18,490
or I can say show me the path.

123
00:07:18,490 --> 00:07:21,670
Now, even though path is not part of the default output,

124
00:07:21,670 --> 00:07:26,940
I see it listed there as a script property,

125
00:07:26,940 --> 00:07:31,540
and I can view the path value of this particular process.

126
00:07:31,540 --> 00:07:32,740
Now here's a little trick.

127
00:07:32,740 --> 00:07:36,550
Sometimes when you look at Get‑Member, and you see these property names,

128
00:07:36,550 --> 00:07:38,640
they may not make sense to you.

129
00:07:38,640 --> 00:07:44,040
I find it often helps to see the actual value that goes to the property name,

130
00:07:44,040 --> 00:07:45,250
and here's how I do that.

131
00:07:45,250 --> 00:07:48,610
I take a sample object type, pipe it into Select‑Object,

132
00:07:48,610 --> 00:07:53,140
and then select all of the properties using the * wildcard.

133
00:07:53,140 --> 00:07:57,840
Now I can see the property name, and I can see the value.

134
00:07:57,840 --> 00:08:00,790
This helps me discover what the object looks like so that

135
00:08:00,790 --> 00:08:03,360
when I'm working with it with a formatting,

136
00:08:03,360 --> 00:08:07,270
or selecting properties, or doing, piping this to something else,

137
00:08:07,270 --> 00:08:11,220
and I wanted to work with a property, I know what the property name is,

138
00:08:11,220 --> 00:08:14,340
and I know what kind of value I can expect from that.

139
00:08:14,340 --> 00:08:17,800
I use this technique all the time, and I think you will too.

140
00:08:17,800 --> 00:08:21,040
And you can take this dotted notation and really run with it.

141
00:08:21,040 --> 00:08:25,440
For example, $p has a modules property.

142
00:08:25,440 --> 00:08:27,550
This shows me all of the modules that are

143
00:08:27,550 --> 00:08:31,140
associated with this particular process.

144
00:08:31,140 --> 00:08:34,240
And these are Windows modules, not PowerShell modules.

145
00:08:34,240 --> 00:08:37,840
This output is a nested set of objects,

146
00:08:37,840 --> 00:08:41,110
and these objects have particular properties as well.

147
00:08:41,110 --> 00:08:42,540
I could pipe this to Get‑Member,

148
00:08:42,540 --> 00:08:46,950
but I will scroll up here and show you that module name,

149
00:08:46,950 --> 00:08:50,440
probably the property.

150
00:08:50,440 --> 00:08:54,070
So what I can do is I can do $p modules,

151
00:08:54,070 --> 00:08:58,440
and then just say just show me the modulename.

152
00:08:58,440 --> 00:09:03,040
So now I see the module name of all the modules of $p.

153
00:09:03,040 --> 00:09:08,930
There's no limit to what you can do, just keep doing object.property.

154
00:09:08,930 --> 00:09:09,650
property.

155
00:09:09,650 --> 00:09:10,740
property.

156
00:09:10,740 --> 00:09:12,760
If the property is a nested object,

157
00:09:12,760 --> 00:09:15,600
PowerShell will just automatically expand it for you.

158
00:09:15,600 --> 00:09:17,440
In fact, here's a really cool trick.

159
00:09:17,440 --> 00:09:22,940
Let's take $all, and hold that for all Get‑Processes.

160
00:09:22,940 --> 00:09:30,340
If I do $$all.Name, this will give me a list of all of the process names.

161
00:09:30,340 --> 00:09:33,390
So that's kind of a quick and easy way if you just want to get a

162
00:09:33,390 --> 00:09:38,740
list of properties from a particular object.

163
00:09:38,740 --> 00:09:40,010
Now as I've kind of shown you,

164
00:09:40,010 --> 00:09:45,940
don't assume that what you see by default is all there is to an object.

165
00:09:45,940 --> 00:09:49,610
I'm going to run my Get‑Vegetable command from PS teaching tools,

166
00:09:49,610 --> 00:09:51,740
which we've looked at earlier in the course.

167
00:09:51,740 --> 00:09:53,240
I left a note in the,

168
00:09:53,240 --> 00:09:56,940
I left a note in the course files telling you how you can install the module.

169
00:09:56,940 --> 00:10:01,070
So if I run Get‑Vegetable, right, there's the default output,

170
00:10:01,070 --> 00:10:02,570
and if you're new to PowerShell, you think,

171
00:10:02,570 --> 00:10:04,600
oh, okay, I see the property names there,

172
00:10:04,600 --> 00:10:08,340
so let me try this, let me try running Get‑Vegetable,

173
00:10:08,340 --> 00:10:12,940
and select the name, state, and count.

174
00:10:12,940 --> 00:10:15,000
Well that kind of worked, I got name and count,

175
00:10:15,000 --> 00:10:17,640
but did not get anything from state.

176
00:10:17,640 --> 00:10:19,140
Why is that?

177
00:10:19,140 --> 00:10:22,390
This is where discovery and using things like

178
00:10:22,390 --> 00:10:26,740
Select‑Object and Get‑Member come into handy.

179
00:10:26,740 --> 00:10:29,680
So I'm going to pipe Get‑Vegetable to Get‑Member.

180
00:10:29,680 --> 00:10:32,960
All right, so I can see the properties there.

181
00:10:32,960 --> 00:10:38,840
Now there's, I don't see a value for state.

182
00:10:38,840 --> 00:10:44,340
There is CookedState, which may be what I want.

183
00:10:44,340 --> 00:10:47,370
The best way is to get a sample object, such as corn,

184
00:10:47,370 --> 00:10:51,760
and we'll do my Select‑Object * trick, and sure enough,

185
00:10:51,760 --> 00:10:55,440
CookedState is the property that I want to use.

186
00:10:55,440 --> 00:11:01,040
Once I know that, then I can rerun my command.

187
00:11:01,040 --> 00:11:03,460
Now I get the results that I am expecting,

188
00:11:03,460 --> 00:11:06,710
or there may be more to the object that you want to work

189
00:11:06,710 --> 00:11:08,810
with that isn't displayed by default.

190
00:11:08,810 --> 00:11:12,250
We kind of saw that with processes, let's do this with Get_Winevent.

191
00:11:12,250 --> 00:11:15,460
Let me just grab a sample object.

192
00:11:15,460 --> 00:11:18,920
All right, so that's the default display,

193
00:11:18,920 --> 00:11:22,890
but again, that is not all there is to this object.

194
00:11:22,890 --> 00:11:25,300
I save the output to $e.

195
00:11:25,300 --> 00:11:29,240
So let's just take $e, and pipe that to Get‑Member.

196
00:11:29,240 --> 00:11:31,840
As you see, there are lots of properties there.

197
00:11:31,840 --> 00:11:34,990
Once you discover what the properties are and the values,

198
00:11:34,990 --> 00:11:39,030
then I can rerun a command, so I get the system log,

199
00:11:39,030 --> 00:11:43,940
the 10 most recent events, and just give me some properties,

200
00:11:43,940 --> 00:11:46,840
many of them drawn from this list.

201
00:11:46,840 --> 00:11:50,240
And PowerShell gives me the result now that I am expecting.

202
00:11:50,240 --> 00:11:53,570
So you can use any property that you discover here.

203
00:11:53,570 --> 00:11:56,020
If I decide that I want to, for example,

204
00:11:56,020 --> 00:12:01,080
group, I can group on any property that I see in this list,

205
00:12:01,080 --> 00:12:03,450
so I want to group on the LevelDisplayName.

206
00:12:03,450 --> 00:12:06,300
Now I can see the errors, information,

207
00:12:06,300 --> 00:12:10,680
and warning from the most recent 1000 entries in the system event log.

208
00:12:10,680 --> 00:12:13,580
Knowing how to use Get‑Member to discover an object's

209
00:12:13,580 --> 00:12:15,590
properties is something that you really need to get in

210
00:12:15,590 --> 00:12:18,840
the habit of doing all the time.

211
00:12:18,840 --> 00:12:20,710
Objects also have methods,

212
00:12:20,710 --> 00:12:23,430
so let me give you a taste of how to work with methods.

213
00:12:23,430 --> 00:12:29,940
I'm going to go ahead and start Notepad just so I have another process here,

214
00:12:29,940 --> 00:12:34,440
and I'm going to save $n to get the Notepad process.

215
00:12:34,440 --> 00:12:39,640
And if I pipe $n to Get‑Member, and just look at the methods,

216
00:12:39,640 --> 00:12:43,420
I'm going to use the CloseMainWindow method because that

217
00:12:43,420 --> 00:12:46,460
is a way to gracefully close a process.

218
00:12:46,460 --> 00:12:51,830
So I can do $n CloseMainWindow using the dotted notation.

219
00:12:51,830 --> 00:12:53,650
Now when you invoke a method,

220
00:12:53,650 --> 00:12:56,640
you have to include the parentheses because

221
00:12:56,640 --> 00:13:00,340
sometimes a method will have parameters.

222
00:13:00,340 --> 00:13:02,130
For example, in the kill method,

223
00:13:02,130 --> 00:13:06,440
you can see that there is a way to use kill with no parameters,

224
00:13:06,440 --> 00:13:10,970
and then there's a way to use kill that takes a boolean value,

225
00:13:10,970 --> 00:13:12,040
basically true or false,

226
00:13:12,040 --> 00:13:16,540
that indicates whether you want to kill the entire process tree as well.

227
00:13:16,540 --> 00:13:19,450
So that's why you need to use the parentheses.

228
00:13:19,450 --> 00:13:22,140
So if I close the main window,

229
00:13:22,140 --> 00:13:27,540
I get a result of true because if you look at the CloseMainWindow method there,

230
00:13:27,540 --> 00:13:28,680
see where it says bool,

231
00:13:28,680 --> 00:13:33,770
that is an indication that the output of this method is a boolean.

232
00:13:33,770 --> 00:13:36,210
If you see an output of void,

233
00:13:36,210 --> 00:13:40,840
that means that the method does not write anything to the pipeline.

234
00:13:40,840 --> 00:13:43,320
If I try to get the Notepad process,

235
00:13:43,320 --> 00:13:46,830
I get an error message because I have closed it.

236
00:13:46,830 --> 00:13:50,840
Here, let me give you another example of working with methods.

237
00:13:50,840 --> 00:13:58,150
Let me create an array of names, and so the first name in this array, index 0.

238
00:13:58,150 --> 00:14:02,920
remember that from our previous module, if I look at the member type,

239
00:14:02,920 --> 00:14:06,040
I know that there is a member called ToUpper.

240
00:14:06,040 --> 00:14:10,060
So with this, it'll take the string and make it all uppercase.

241
00:14:10,060 --> 00:14:14,140
There is also another option there which we're not going to to use.

242
00:14:14,140 --> 00:14:17,710
So I can take $n, and for each object,

243
00:14:17,710 --> 00:14:23,840
I want to take the value of $n and make it all uppercase.

244
00:14:23,840 --> 00:14:24,940
And there we go.

245
00:14:24,940 --> 00:14:28,660
So I wasn't able to invoke the method using the dotted notation.

246
00:14:28,660 --> 00:14:31,890
In the same way that I use the dotted notation against a

247
00:14:31,890 --> 00:14:34,740
group of objects in order to get a property,

248
00:14:34,740 --> 00:14:36,550
you can do the same thing with methods.

249
00:14:36,550 --> 00:14:39,320
Maybe not all the time, but in this particular case, you can.

250
00:14:39,320 --> 00:14:45,150
So I can say, hey, take all the entries of $n and make them all uppercase.

251
00:14:45,150 --> 00:14:47,640
So it's a much faster and easier way than having to

252
00:14:47,640 --> 00:14:52,140
pipe through to foreach object.

253
00:14:52,140 --> 00:14:56,380
There is also a member called substring, which allows me to get

254
00:14:56,380 --> 00:14:59,820
a part of a string starting at some index number, and the index

255
00:14:59,820 --> 00:15:03,140
for the strings always start at 0.

256
00:15:03,140 --> 00:15:09,340
So here's what I could do, for each object in $n,

257
00:15:09,340 --> 00:15:12,250
I'm going to create a new string.

258
00:15:12,250 --> 00:15:14,230
Now here I'm using a variable expansion.

259
00:15:14,230 --> 00:15:16,750
You start seeing some things that we've been looking at

260
00:15:16,750 --> 00:15:20,140
earlier in the course all come back here.

261
00:15:20,140 --> 00:15:26,590
I'm using a sub expression, and I'm going to get the substring of the

262
00:15:26,590 --> 00:15:31,770
first object in the pipeline, so FRED, and the substring, I'm using the

263
00:15:31,770 --> 00:15:36,240
method that takes a starting index and a length.

264
00:15:36,240 --> 00:15:40,760
So I'm getting the starting at 0 and going 1 character, in

265
00:15:40,760 --> 00:15:45,960
essence the first letter of the name, and then I'm going to take

266
00:15:45,960 --> 00:15:49,940
that string and make it all uppercase.

267
00:15:49,940 --> 00:15:55,790
And then I'm immediately appending to that the substring of the current object

268
00:15:55,790 --> 00:15:59,260
starting at index 1, and because I don't specify a length,

269
00:15:59,260 --> 00:16:02,940
it gets the rest of the string.

270
00:16:02,940 --> 00:16:06,390
So now what this has done is created a proper case

271
00:16:06,390 --> 00:16:08,610
version of all of those names.

272
00:16:08,610 --> 00:16:11,910
There are other ways that you could do this, I just wanted to kind of use

273
00:16:11,910 --> 00:16:17,030
this as a demonstration of invoking method and also to reinforce concepts we

274
00:16:17,030 --> 00:16:21,230
have looked at in this course. In the next module,

275
00:16:21,230 --> 00:16:24,020
I'm going to show you other things that you can do with strings, this

276
00:16:24,020 --> 00:16:26,350
is kind of a little taste of what you can expect.

277
00:16:26,350 --> 00:16:30,040
It's very important that you understand what an object is,

278
00:16:30,040 --> 00:16:32,960
how to use it, how to discover its properties,

279
00:16:32,960 --> 00:16:36,480
how to view the properties, how to access methods.

280
00:16:36,480 --> 00:16:40,380
One quick thing though about the method, don't feel that you have to be

281
00:16:40,380 --> 00:16:43,470
looking for methods in order to do something to an object.

282
00:16:43,470 --> 00:16:46,440
Look for cmdlets first. Many of the cmdlets are

283
00:16:46,440 --> 00:16:48,910
based upon the method of an object,

284
00:16:48,910 --> 00:16:52,470
so you don't have to kill a process by invoking the kill method,

285
00:16:52,470 --> 00:16:55,460
there's a stop process cmdlet that you would use.

286
00:16:55,460 --> 00:16:59,050
So always look for cmdlets. The methods listed there are

287
00:16:59,050 --> 00:17:05,000
for cases where there is no cmdlet or you need to do something to fill a special use case.

