Chapter 8. Scriptblocks and objects

8.1

Scriptblock basics

215

8.2

Building and manipulating objects

222

8.3

A closer look at the type-system plumbing

233

8.4

Extending the PowerShell language

237

8.5

Type extension

243

8.6

Building code at runtime

245

8.7

Summary

249

 

Philosophy have I digested,

The whole of Law and Medicine,

From each its secrets I have wrested,

Theology, alas, thrown in.

Poor fool, with all this sweated lore,

I stand no wiser than I was before.

 
 --Johann Wolfgang Goethe, Faust
 

Greek letters are cool...

 
 --Not actually a quote from Beavis and Butthead

Chapter 7 covered the basic elements of programming in PowerShell: functions and scripts. In this chapter, we’ll take things to the next level and talk about metaprogramming. Metaprogramming is the term ...

Get Windows PowerShell in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.