16 Filling out a manifest
Up to this point, you’ve been relying on the PowerShell magic to make your commands—within a module—run. It’s worth digging into this magic a bit because you can do much more with it.
16.1 Module execution order
When PowerShell looks for modules, it first enumerates all the folders listed in the PSModulePath
environment variable. Each folder under each of those paths is considered a potential module.
Within a module folder, PowerShell looks for the following:
-
A .psd1 file with the same filename as the module’s folder name. This module manifest tells the shell what else needs to be loaded.
-
A .dll file with the same filename as the module’s folder name. This is a compiled or binary module, usually written in C#.
Get Learn PowerShell Scripting in a Month of Lunches, Second 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.