Skip to Main Content
Learn PowerShell Scripting in a Month of Lunches, Second Edition
book

Learn PowerShell Scripting in a Month of Lunches, Second Edition

by James Petty, Jeffery Hicks, Don Jones
April 2024
Beginner to intermediate content levelBeginner to intermediate
336 pages
8h 51m
English
Manning Publications
Content preview from Learn PowerShell Scripting in a Month of Lunches, Second Edition

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:

  1. 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.

  2. A .dll file with the same filename as the module’s folder name. This is a compiled or binary module, usually written in C#.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learn PowerShell Scripting in a Month of Lunches

Learn PowerShell Scripting in a Month of Lunches

Jeffery Hicks, Don Jones
Learn PowerShell in a Month of Lunches, Fourth Edition

Learn PowerShell in a Month of Lunches, Fourth Edition

Tyler Leonhardt, Travis Plunk, James Petty

Publisher Resources

ISBN: 9781633438989Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentPurchase Link