Chapter 9. Module manifests and metadata

 

This chapter covers

  • Module folder structure
  • Module manifest structure and elements
  • Advanced module operations
  • Publishing a module

The world is my world: this is manifest in the fact that the limits of language (of that language which alone I understand) mean the limits of my world.

Ludwig Wittgenstein, Tractatus Logico-Philosophicus

In chapter 8, we introduced PowerShell modules and covered the basics needed for using and writing modules. The code in your module isn’t the full story. There needs to be a way to attach production-oriented metadata to your modules—it’s the difference between ad hoc and production scripting. Module manifests enable you to annotate and organize the pieces in more complex, multifile modules. You can think of them as a set of instructions to be implemented when the module is loaded. The instructions tell PowerShell which cmdlets, variables, and aliases to load and which will remain private. Like bookkeeping and inventory management, manifests are complicated and a bit boring but absolutely necessary when doing production scripting.

9.1. Module folder structure

9.2. Module manifest structure

9.3. Production manifest elements

9.4. Construction manifest elements

9.5. Content manifest elements

9.6. Advanced module operations

9.7. Publishing a module to a PowerShell Gallery

9.8. Summary

sitemap