Creating a module
I’m writing a new PowerShell book and have got to the fun bit where I’m creating lots of scripts. I wanted to supply these as a series of modules. So each individual listing is a function. But I don’t want to manually maintain the module file as I’m working through each chapter. Usually I create a module with one .psm1 file that has all of the functions in it.
It is also possible to have a .psm1 file that runs a set of other PowerShell scripts. So that’s what I’ve done. The script shows how I can create a module file by getting the names of the individual PowerShell files adding the “. ./” in front to dot source them.
One quick module file with minimum effort.