1
00:00:00,000 --> 00:00:06,000
We're at Microsoft TechEd IT Forum in Barcelona, 2007.

2
00:00:06,000 --> 00:00:09,000
And we've got someone else excited to talk with for a little bit.

3
00:00:09,000 --> 00:00:10,000
Would you like to introduce yourself?

4
00:00:10,000 --> 00:00:14,000
Sure. I'm Jeffrey Snover. I'm the architect for Windows PowerShell.

5
00:00:14,000 --> 00:00:17,000
And so, what is PowerShell exactly? Sounds very powerful.

6
00:00:17,000 --> 00:00:19,000
It is. Great name.

7
00:00:19,000 --> 00:00:23,000
So, Windows PowerShell is our next-generation command line shell and scripting language.

8
00:00:23,000 --> 00:00:27,000
So, it's as interactive and composable as the traditional shells,

9
00:00:27,000 --> 00:00:31,000
k-shell and bash. But it's programmatic as, say, Perl and Ruby.

10
00:00:31,000 --> 00:00:35,000
And then it has production qualities like AS400 or CL.

11
00:00:35,000 --> 00:00:40,000
And then we expose the object stores of Windows as file systems.

12
00:00:40,000 --> 00:00:42,000
So, it's easy to find all this stuff and manipulate it.

13
00:00:42,000 --> 00:00:44,000
So, essentially, it's a scripting language.

14
00:00:44,000 --> 00:00:47,000
And a shell builds around that scripting language for the Windows.

15
00:00:47,000 --> 00:00:49,000
Yeah, but it's really focused in on the interactive use.

16
00:00:49,000 --> 00:00:52,000
So, it's focused in on that interactive shell experience.

17
00:00:52,000 --> 00:00:56,000
And the big thing that differentiates PowerShell from everything else

18
00:00:56,000 --> 00:00:58,000
is our pipelines of objects.

19
00:00:58,000 --> 00:00:59,000
Right.

20
00:00:59,000 --> 00:01:01,000
In the traditional shell, you pipeline text.

21
00:01:01,000 --> 00:01:05,000
And so, then you've got to parse all this text, all this prayer-based parsing.

22
00:01:05,000 --> 00:01:06,000
Lots of grepping and knocking and everything.

23
00:01:06,000 --> 00:01:07,000
Exactly.

24
00:01:07,000 --> 00:01:08,000
And it's great stuff.

25
00:01:08,000 --> 00:01:12,000
But, man, when you just want to get the job done, it's a pain in the butt.

26
00:01:12,000 --> 00:01:13,000
So, we pipeline objects.

27
00:01:13,000 --> 00:01:17,000
And whereas that sounds like scary, oh my God, objects.

28
00:01:17,000 --> 00:01:21,000
In fact, it just dramatically simplifies the tasks of the registration.

29
00:01:21,000 --> 00:01:22,000
Right.

30
00:01:22,000 --> 00:01:24,000
It basically accesses everything in the CLR, if I remember, right?

31
00:01:24,000 --> 00:01:25,000
Yeah.

32
00:01:25,000 --> 00:01:26,000
I mean, you kind of have access to all the .NET objects.

33
00:01:26,000 --> 00:01:27,000
Yep.

34
00:01:27,000 --> 00:01:28,000
But then, also, everything outside of that.

35
00:01:28,000 --> 00:01:29,000
So, WMI.

36
00:01:29,000 --> 00:01:30,000
Right.

37
00:01:30,000 --> 00:01:31,000
We invoke traditional stuff.

38
00:01:31,000 --> 00:01:32,000
Get their text.

39
00:01:32,000 --> 00:01:33,000
We do text parsing.

40
00:01:33,000 --> 00:01:34,000
You bet.

41
00:01:34,000 --> 00:01:36,000
There's still stuff that does that.

42
00:01:36,000 --> 00:01:42,000
Support WMI, COM, ADSI, ADO, XML, and the entire .NET framework.

43
00:01:42,000 --> 00:01:43,000
Right.

44
00:01:43,000 --> 00:01:45,000
It's this universal blue language.

45
00:01:45,000 --> 00:01:46,000
What does Microsoft use it for?

46
00:01:46,000 --> 00:01:52,000
Oh, we're using it for--it is basically our strategy for the automating all of our operating

47
00:01:52,000 --> 00:01:53,000
systems and products.

48
00:01:53,000 --> 00:01:54,000
Right.

49
00:01:54,000 --> 00:01:57,000
So, it's what's called a common engineering criteria, which means you're in the server and

50
00:01:57,000 --> 00:01:58,000
tools business.

51
00:01:58,000 --> 00:02:00,000
You want to ship the product in 2009?

52
00:02:00,000 --> 00:02:02,000
You have to have PowerShell support.

53
00:02:02,000 --> 00:02:03,000
Right.

54
00:02:03,000 --> 00:02:07,000
And by PowerShell support, that means exposing different functions on whatever the software

55
00:02:07,000 --> 00:02:08,000
is you're working on.

56
00:02:08,000 --> 00:02:09,000
Exactly.

57
00:02:09,000 --> 00:02:11,000
Let's say your component is manageable via PowerShell.

58
00:02:11,000 --> 00:02:12,000
Right.

59
00:02:12,000 --> 00:02:18,000
The other thing is that all of our strategy now is to layer our admin GUIs on top of PowerShell.

60
00:02:18,000 --> 00:02:23,000
So, I mentioned scripting language is an engine, but it's also an engine that can be hosted

61
00:02:23,000 --> 00:02:28,000
by other language--by other executables, in particular, your admin GUI.

62
00:02:28,000 --> 00:02:31,000
So, now you write your admin GUI, lay it on top of PowerShell.

63
00:02:31,000 --> 00:02:34,000
Your GUI is a subset of the things you can do in the command line.

64
00:02:34,000 --> 00:02:35,000
Oh, right, right.

65
00:02:35,000 --> 00:02:38,000
So, not only is there a text interface, but you can have a--does the GUI--you have to code

66
00:02:38,000 --> 00:02:41,000
the GUI, or does it kind of figure out what the GUI would look like on top?

67
00:02:41,000 --> 00:02:42,000
Yeah.

68
00:02:42,000 --> 00:02:43,000
No, you have to code the GUI.

69
00:02:43,000 --> 00:02:44,000
For now.

70
00:02:44,000 --> 00:02:45,000
That's still a GUI.

71
00:02:45,000 --> 00:02:46,000
That's nice.

72
00:02:46,000 --> 00:02:47,000
Yeah.

73
00:02:47,000 --> 00:02:48,000
It's dramatically simpler.

74
00:02:48,000 --> 00:02:49,000
Right.

75
00:02:49,000 --> 00:02:51,000
Because all your logic's in the--in the--in the--in the automation engine.

76
00:02:51,000 --> 00:02:53,000
And then your GUI's a very thin layer.

77
00:02:53,000 --> 00:02:56,000
So, it reduces the amount of testing you have to do, the amount of coding.

78
00:02:56,000 --> 00:03:00,000
If you have to go from one GUI framework to another, it's really simple to do because

79
00:03:00,000 --> 00:03:02,000
all the--the tough stuff's in the logic.

80
00:03:02,000 --> 00:03:03,000
Right.

81
00:03:03,000 --> 00:03:05,000
How long has PowerShell been out for now?

82
00:03:05,000 --> 00:03:06,000
One year.

83
00:03:06,000 --> 00:03:07,000
Exactly one year.

84
00:03:07,000 --> 00:03:10,000
And the--the adoption rate's been, like, amazing.

85
00:03:10,000 --> 00:03:11,000
Yeah, yeah, yeah.

86
00:03:11,000 --> 00:03:12,000
Yeah.

87
00:03:12,000 --> 00:03:15,000
Before--about this time last year, we were sitting around saying, "Oh, how many people

88
00:03:15,000 --> 00:03:16,000
will adopt it?"

89
00:03:16,000 --> 00:03:19,000
And somebody said, "Oh, I bet you'll have a million downloads in a year."

90
00:03:19,000 --> 00:03:21,000
And I said, "My friend, let me explain how this works."

91
00:03:21,000 --> 00:03:23,000
These things take a long, long, long time.

92
00:03:23,000 --> 00:03:24,000
Right.

93
00:03:24,000 --> 00:03:25,000
And boy, was I wrong.

94
00:03:25,000 --> 00:03:26,000
Right, right.

95
00:03:26,000 --> 00:03:29,000
We had a million and a half downloads in a year.

96
00:03:29,000 --> 00:03:32,000
So, do you know, like, what types of people have been downloading it?

97
00:03:32,000 --> 00:03:33,000
Yeah.

98
00:03:33,000 --> 00:03:34,000
So, it's--it's across the board.

99
00:03:34,000 --> 00:03:35,000
So, it's developers.

100
00:03:35,000 --> 00:03:36,000
It's IT pros.

101
00:03:36,000 --> 00:03:39,000
People are running it in production.

102
00:03:39,000 --> 00:03:42,000
MySpace was running it in production six months before we released it.

103
00:03:42,000 --> 00:03:43,000
Oh, right.

104
00:03:43,000 --> 00:03:45,000
They were using an RC, like a beta or something, right?

105
00:03:45,000 --> 00:03:46,000
Yeah.

106
00:03:46,000 --> 00:03:47,000
Exactly.

107
00:03:47,000 --> 00:03:49,000
And so, now we see more and more customers using it in production.

108
00:03:49,000 --> 00:03:50,000
Right.

109
00:03:50,000 --> 00:03:51,000
So, that's an interesting example.

110
00:03:51,000 --> 00:03:54,000
I mean, what--what does--what does MySpace use PowerShell to accomplish?

111
00:03:54,000 --> 00:03:55,000
Yeah.

112
00:03:55,000 --> 00:03:56,000
Automation.

113
00:03:56,000 --> 00:03:58,000
Before that, they had a very manual process.

114
00:03:58,000 --> 00:03:59,000
Right.

115
00:03:59,000 --> 00:04:03,000
And so, they said that they were able to go--you automated their entire system using PowerShell.

116
00:04:03,000 --> 00:04:04,000
Right.

117
00:04:04,000 --> 00:04:08,000
And because of that, they were able to go from 1,000 servers to 4,000 servers.

118
00:04:08,000 --> 00:04:09,000
Right, right.

119
00:04:09,000 --> 00:04:14,000
So, automation in this instance, I mean, what do you mean exactly by automation?

120
00:04:14,000 --> 00:04:15,000
Just to clarify.

121
00:04:15,000 --> 00:04:16,000
Sure.

122
00:04:16,000 --> 00:04:18,000
So, something goes wrong.

123
00:04:18,000 --> 00:04:19,000
Right.

124
00:04:19,000 --> 00:04:21,000
You know, now I've got to go change a bunch of things.

125
00:04:21,000 --> 00:04:25,000
So, they have scripts that say, you know, find me all the things that have this condition.

126
00:04:25,000 --> 00:04:26,000
Right.

127
00:04:26,000 --> 00:04:27,000
And perform this operation on it.

128
00:04:27,000 --> 00:04:28,000
Right, right.

129
00:04:28,000 --> 00:04:31,000
So, it's sort of like batch operations over a bunch of different machines or objects or

130
00:04:31,000 --> 00:04:32,000
whatever.

131
00:04:32,000 --> 00:04:33,000
Yeah, exactly.

132
00:04:33,000 --> 00:04:34,000
And they wrote their own GUI on top of it.

133
00:04:34,000 --> 00:04:35,000
So, they've got their own GUI.

134
00:04:35,000 --> 00:04:36,000
Right.

135
00:04:36,000 --> 00:04:37,000
They're on top of their command line interface.

136
00:04:37,000 --> 00:04:38,000
And it's sweet.

137
00:04:38,000 --> 00:04:40,000
It does exactly what they want it to do.

138
00:04:40,000 --> 00:04:41,000
Right.

139
00:04:41,000 --> 00:04:43,000
So, I mean, that gets to one sort of interesting cultural thing.

140
00:04:43,000 --> 00:04:49,000
I mean, it doesn't seem like scripting has been huge in the Microsoft area.

141
00:04:49,000 --> 00:04:51,000
Even though there's VBScript and batch files and everything like that.

142
00:04:51,000 --> 00:04:52,000
Sure.

143
00:04:52,000 --> 00:04:56,000
And, I mean, do you think, first off, do you think that perception is kind of true that

144
00:04:56,000 --> 00:04:57,000
there wasn't much scripting?

145
00:04:57,000 --> 00:04:58,000
No.

146
00:04:58,000 --> 00:05:03,000
And then, if it is true, can you see that people are taking up scripting a lot more?

147
00:05:03,000 --> 00:05:04,000
Yeah.

148
00:05:04,000 --> 00:05:05,000
Like, being more Unix-like, if you will?

149
00:05:05,000 --> 00:05:06,000
Yeah, absolutely.

150
00:05:06,000 --> 00:05:08,000
In the sense that, you know, VBScript is great.

151
00:05:08,000 --> 00:05:11,000
But if you actually go and take a look at a VBScript.

152
00:05:11,000 --> 00:05:12,000
Right.

153
00:05:12,000 --> 00:05:15,000
It's essentially what I like to call systems programming parentheses.

154
00:05:15,000 --> 00:05:16,000
Right?

155
00:05:16,000 --> 00:05:17,000
Yeah, yeah.

156
00:05:17,000 --> 00:05:21,000
So, you take a look at the script and it's this horrible WebM Connect with all these things.

157
00:05:21,000 --> 00:05:23,000
And then you get this object.

158
00:05:23,000 --> 00:05:26,000
And it's all these, like, detailed, really fine-grained stuff.

159
00:05:26,000 --> 00:05:27,000
Right.

160
00:05:27,000 --> 00:05:28,000
But then, wait.

161
00:05:28,000 --> 00:05:31,000
I'll make it simple by your if statement doesn't have that parentheses.

162
00:05:31,000 --> 00:05:32,000
Right.

163
00:05:32,000 --> 00:05:33,000
Like, that was the problem.

164
00:05:33,000 --> 00:05:38,000
So, yeah, I don't think that enough scripting has been done on Windows.

165
00:05:38,000 --> 00:05:41,000
But I believe that's because we've tried to make it much too hard.

166
00:05:41,000 --> 00:05:42,000
Right, right.

167
00:05:42,000 --> 00:05:44,000
In fact, it's really been simple programming.

168
00:05:44,000 --> 00:05:47,000
And then with PowerShell now, that's not at all the case.

169
00:05:47,000 --> 00:05:49,000
You know, you can start off with the GUI.

170
00:05:49,000 --> 00:05:50,000
If you like the GUI, that's great.

171
00:05:50,000 --> 00:05:51,000
You have the GUI.

172
00:05:51,000 --> 00:05:53,000
But then the GUI can teach you the command line.

173
00:05:53,000 --> 00:05:54,000
Right.

174
00:05:54,000 --> 00:05:57,000
You have the command line of these nice, high-level task-oriented abstractions.

175
00:05:57,000 --> 00:05:58,000
So, you can stay there.

176
00:05:58,000 --> 00:06:03,000
If you need to access something via com or XML or .NET or whatever, you can do that.

177
00:06:03,000 --> 00:06:06,000
But in general, you want to have nice, high-level abstractions.

178
00:06:06,000 --> 00:06:07,000
And frankly, everybody likes that.

179
00:06:07,000 --> 00:06:10,000
The nice thing about it is then, because you do that, you know, here's the deal.

180
00:06:10,000 --> 00:06:15,000
It's Friday night, and you want to be out with your wife watching a movie.

181
00:06:15,000 --> 00:06:17,000
And something goes wrong, right?

182
00:06:17,000 --> 00:06:18,000
Two choices.

183
00:06:18,000 --> 00:06:21,000
One, fly in, you know, click, click, click of the mouse.

184
00:06:21,000 --> 00:06:22,000
Right.

185
00:06:22,000 --> 00:06:26,000
Or, you have some monitor that's watching some event and runs a script for you automatically.

186
00:06:26,000 --> 00:06:27,000
Right, right, right.

187
00:06:27,000 --> 00:06:28,000
Right?

188
00:06:28,000 --> 00:06:29,000
You choose.

189
00:06:29,000 --> 00:06:36,000
Another aspect that's kind of easy to gloss over is the, I mean, how do you hook up PowerShell

190
00:06:36,000 --> 00:06:37,000
script to, like, events like that?

191
00:06:37,000 --> 00:06:38,000
Yeah.

192
00:06:38,000 --> 00:06:39,000
Or to the alarms?

193
00:06:39,000 --> 00:06:43,000
I mean, is that, is that just, you just add it as an execution task, or what's that?

194
00:06:43,000 --> 00:06:44,000
Yeah, that's exactly correct.

195
00:06:44,000 --> 00:06:48,000
You say, you just say PowerShell, and then minus command, and the command you want to run.

196
00:06:48,000 --> 00:06:49,000
Right.

197
00:06:49,000 --> 00:06:53,000
And then I assume that whatever's executing it passes in a bunch of some variables that

198
00:06:53,000 --> 00:06:54,000
it can use to get context.

199
00:06:54,000 --> 00:06:55,000
Yeah.

200
00:06:55,000 --> 00:06:56,000
You pass that.

201
00:06:56,000 --> 00:06:57,000
Right, right, right.

202
00:06:57,000 --> 00:06:58,000
Just in the command line.

203
00:06:58,000 --> 00:07:01,000
And so, so the last thing is, so since PowerShell's been out for a year, and obviously

204
00:07:01,000 --> 00:07:05,000
was in, you know, beta and release Canada for a little while before that, so what, what are

205
00:07:05,000 --> 00:07:07,000
some, some other non-Microsoft people that are using it?

206
00:07:07,000 --> 00:07:09,000
Yeah, so we've got great adoption in the community.

207
00:07:09,000 --> 00:07:10,000
Of course.

208
00:07:10,000 --> 00:07:15,000
So, F5, the guys who do the network stuff, they've done it.

209
00:07:15,000 --> 00:07:17,000
Quest Software's supported it.

210
00:07:17,000 --> 00:07:20,000
Citrix has recently announced in their conference that they'll be supporting it.

211
00:07:20,000 --> 00:07:21,000
Right.

212
00:07:21,000 --> 00:07:25,000
If you take a look at VMware, in their conference, they showed support for it.

213
00:07:25,000 --> 00:07:26,000
Right.

214
00:07:26,000 --> 00:07:27,000
They're showing up all over.

215
00:07:27,000 --> 00:07:31,000
If you go down to the, uh, environment here, there are folks that have, uh, group policy

216
00:07:31,000 --> 00:07:32,000
command lads.

217
00:07:32,000 --> 00:07:33,000
Yeah.

218
00:07:33,000 --> 00:07:38,000
Full Armor has this wonderful, uh, designer where it's a workflow and PowerShell together

219
00:07:38,000 --> 00:07:39,000
to run book automation.

220
00:07:39,000 --> 00:07:40,000
Yeah.

221
00:07:40,000 --> 00:07:43,000
And are, are they actually, actually executing that in the context of their own system, or,

222
00:07:43,000 --> 00:07:46,000
or making, like, operations manage or execute it, or, or?

223
00:07:46,000 --> 00:07:47,000
No, in the context of their own system.

224
00:07:47,000 --> 00:07:48,000
Oh, right, right, sure.

225
00:07:48,000 --> 00:07:53,000
So, they have, like, their own run book or something, and the run book stuff executes

226
00:07:53,000 --> 00:07:54,000
it.

227
00:07:54,000 --> 00:07:55,000
Yep.

228
00:07:55,000 --> 00:07:56,000
Right, right.

229
00:07:56,000 --> 00:07:59,000
So, the last question, this is one I get asked a lot, is, so, what's the state of remote

230
00:07:59,000 --> 00:08:00,000
operation of PowerShell?

231
00:08:00,000 --> 00:08:01,000
Yeah.

232
00:08:01,000 --> 00:08:05,000
The sense that I'm on one machine, and I want to execute on these three different machines.

233
00:08:05,000 --> 00:08:06,000
So, we've got great news there.

234
00:08:06,000 --> 00:08:10,000
Uh, we just released, this week, our CTP of version 2.

235
00:08:10,000 --> 00:08:11,000
And that, what, what's the CTP?

236
00:08:11,000 --> 00:08:13,000
Oh, Community Technology Preview.

237
00:08:13,000 --> 00:08:14,000
Right.

238
00:08:14,000 --> 00:08:16,000
So, the thing is, other people call it an alpha.

239
00:08:16,000 --> 00:08:17,000
Okay?

240
00:08:17,000 --> 00:08:18,000
Right.

241
00:08:18,000 --> 00:08:20,000
But it's Microsoft, so I call it a CTP.

242
00:08:20,000 --> 00:08:21,000
Yeah, yeah.

243
00:08:21,000 --> 00:08:24,000
And, uh, it has what we call this universal code execution.

244
00:08:24,000 --> 00:08:27,000
Actually, our first steps on a universal code execution model.

245
00:08:27,000 --> 00:08:29,000
And there, it's not just remote.

246
00:08:29,000 --> 00:08:31,000
It's the thing that says, I have code, and I want to run it.

247
00:08:31,000 --> 00:08:34,000
Sometimes I want to run it here, and sometimes I want to run it there.

248
00:08:34,000 --> 00:08:35,000
Right.

249
00:08:35,000 --> 00:08:37,000
And sometimes I want to run it to a bunch of machines.

250
00:08:37,000 --> 00:08:40,000
Sometimes those machines are over a local area network, sometimes over a wide area network.

251
00:08:40,000 --> 00:08:41,000
Right.

252
00:08:41,000 --> 00:08:43,000
Sometimes I want to run it and get the results immediately.

253
00:08:43,000 --> 00:08:46,000
Sometimes I want to run it and get the results asynchronously.

254
00:08:46,000 --> 00:08:47,000
Sure.

255
00:08:47,000 --> 00:08:49,000
Sometimes I want to run it under my current credentials.

256
00:08:49,000 --> 00:08:50,000
Sometimes I want to provide my set of code.

257
00:08:50,000 --> 00:08:51,000
You want to FD to someone else or whatever, right?

258
00:08:51,000 --> 00:08:52,000
Exactly.

259
00:08:52,000 --> 00:08:57,000
So it's kind of universal code execution model where you have code and you can run in lots

260
00:08:57,000 --> 00:08:59,000
of different places and lots of different conditions.

261
00:08:59,000 --> 00:09:00,000
Right.

262
00:09:00,000 --> 00:09:05,000
Over time we'll add things like, I'd like to run this at this time, every day, etc.

263
00:09:05,000 --> 00:09:06,000
Right, right.

264
00:09:06,000 --> 00:09:10,000
In the past, the remoting was done commandlet by commandlet, and now I have uniform support

265
00:09:10,000 --> 00:09:11,000
for you.

266
00:09:11,000 --> 00:09:13,000
All the version one stuff gets remoting for free.

267
00:09:13,000 --> 00:09:14,000
Right.

268
00:09:14,000 --> 00:09:15,000
We do the remoting.

269
00:09:15,000 --> 00:09:18,000
So it sounds like if you want to start playing around with remoting, that's available now,

270
00:09:18,000 --> 00:09:19,000
you can get the CTP, right?

271
00:09:19,000 --> 00:09:20,000
Yeah, exactly.

272
00:09:20,000 --> 00:09:24,000
And then, by the time you've figured it out, it'll probably, well, it'll be closer to

273
00:09:24,000 --> 00:09:27,000
being a final release and not just an alpha.

274
00:09:27,000 --> 00:09:28,000
Exactly.

275
00:09:28,000 --> 00:09:33,000
Well, then, now the great thing about the CTP is it's early enough that if you have comments,

276
00:09:33,000 --> 00:09:36,000
you have a very good chance of getting those comments active on it.

277
00:09:36,000 --> 00:09:37,000
Right, right.

278
00:09:37,000 --> 00:09:41,000
By the time we get to beta, basically, you know, if it's a real big problem, no one can

279
00:09:41,000 --> 00:09:42,000
address it.

280
00:09:42,000 --> 00:09:45,000
But if you just sit there and say, hey, you know, you ought to have done it this way or

281
00:09:45,000 --> 00:09:48,000
this would be a better way to do it, by the time we get beta, it's really hard to make

282
00:09:48,000 --> 00:09:49,000
those changes.

283
00:09:49,000 --> 00:09:50,000
Yeah, yeah, absolutely.

284
00:09:50,000 --> 00:09:51,000
That gets pushed off to the next release, right?

285
00:09:51,000 --> 00:09:52,000
Exactly.

286
00:09:52,000 --> 00:09:53,000
Yeah.

287
00:09:53,000 --> 00:09:54,000
Thanks for the update.

288
00:09:54,000 --> 00:09:55,000
I really appreciate it.

289
00:09:55,000 --> 00:09:56,000
Excellent.

290
00:09:56,000 --> 00:09:56,000
Thanks.
