Chapter 11. Metaprogramming with scriptblocks and dynamic code

 

This chapter covers:

  • 11.1 Scriptblock basics
  • 11.2 Building and manipulating objects
  • 11.3 Using the Select-Object cmdlet
  • 11.4 Dynamic modules
  • 11.5 Steppable pipelines
  • 11.6 A closer look at the type-system plumbing
  • 11.7 Extending the PowerShell language
  • 11.8 Building script code at runtime
  • 11.9 Compiling code with Add-Type
  • 11.10 Summary

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

11.1. Scriptblock Basics

11.2. Building and Manipulating Objects

11.3. Using the Select-Object Cmdlet

11.4. Dynamic Modules

11.5. Steppable Pipelines

11.6. A Closer Look at the Type-System Plumbing

11.7. Extending the PowerShell Language

11.8. Building Script Code at Runtime

11.9. Compiling Code with Add-Type

11.10. Summary