Chapter 10. Metaprogramming with scriptblocks and dynamic code

This chapter covers

  • Scriptblocks
  • Creating and managing objects
  • Creating code dynamically
  • Steppable pipelines

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

Chapters 6 through 9 covered the basic elements of programming in PowerShell and introduced modules as a way of aggregating your code into reusable pieces. In this chapter, we’ll take things to the next level and talk about metaprogramming, the term used to describe ...

Get Windows PowerShell in Action, Third Edition 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.