Sure, we do this on the PowerShell Community Extensions like so:
RootModule = 'Pscx.psm1'
NestedModules = 'Pscx.dll'
Vra
I have written compiled modules (i.e. PS modules written in C#), where one specifies the DLL as the RootModule
in the manifest, and I have written scripted modules (PS modules written in PowerShell), where one specifies the .psm1 file as the RootModule
, but is it possible to include cmdlets of both type in a single module?
As a temporary measure (while I am developing some new code) I specified my DLL as the RootModule
and listed my scripted cmdlets in ScriptsToProcess
. That makes all the cmdlets accessible, but not properly, in that Get-Command -module MyModule
only lists those cmdlets coming from the RootModule
as one might expect.
Oplossing
Sure, we do this on the PowerShell Community Extensions like so:
RootModule = 'Pscx.psm1'
NestedModules = 'Pscx.dll'