O'Reilly logo

Learn PowerShell Scripting in a Month of Lunches by Don Jones and Jeffery Hicks

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16. Filling out a manifest

Up to this point, you’ve been relying on a little PowerShell magic to make your commands—which are contained within a module—run. It’s worth digging into this magic a bit, because there’s a ton more you can do with it.

16.1. Module execution order

When PowerShell goes looking for modules, it first enumerates all the folders listed in the PSModulePath environment variable. Each folder under each of those paths is considered to be a potential module.

Within a module folder, PowerShell looks for the following:

  1. A .psd1 file having the same filename as the module’s folder name. This is a module manifest and tells the shell what else needs to be loaded.
  2. A .dll file having the same filename as the module’s folder ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required