A module consists of a single file with a psm1 extension, known as the root module, which contains all the functions of that module.
A module may include a manifest file with a psd1 extension that contains extended information (metadata) about the module.
The previous chapter ended with the creation of a DSC resource to set a description for a computer. This was made part of a LocalMachine module. The LocalMachine module will be rewritten in this chapter.
If the LocalMachine module still exists under C:\Program Files\WindowsPowerShell\Modules, it can be deleted at this time.
If the LocalMachine module still exists under C:\Program Files\WindowsPowerShell\Modules, it can be deleted at this time.
Several modules exist to help with creating the initial layout of a module. The Plaster and PSModuleDevelopment modules are both reasonable examples:
- Plaster: https://github.com/PowerShell/Plaster
- PSModuleDevelopment: https://www.powershellgallery.com/packages/PSModuleDevelopment