February 2019
Intermediate to advanced
626 pages
15h 51m
English
The content of the root module executes every time a module is imported. A root module file may be used to perform initialization steps, perhaps filling cache files, importing static data, or setting a default configuration. These steps are extra code that must be added to the root module, perhaps at the beginning or end of the file.
If a module is being built, and the root module is automatically generated, the additional content would need to be drawn in by the merge script. The ModuleBuilder module, introduced when exploring merging content in this chapter, achieves this by using the Prefix and Suffix parameters. Values for this parameter may be supplied when running Build-Module or added to the build.psd1 ...
Read now
Unlock full access