Reputation: 4815
I'm currently learning about PowerShell modules. If you're using a .psd1 manifest file, you have the option to use .ps1 script files as well as .psm1 manfiest files. Why do you need both?
I created a module with both, with the .psm1 set as RootModule and the .ps1 set in ScriptsToProcess and I've noted some differences, but I'm not sure what they add up to.
Upvotes: 2
Views: 5853
Reputation: 1550
The section of your manifest in which you place the references to the Ps1 files determines how they are executed.
In your case:
This is because files listed here are not meant to contain functions; it's meant to be a script. If you want additional functions accessible by your module you have a few options:
Upvotes: 1