Is it possible to register a new PowerShell module just by defining a new module manifest and putting it in the specified directory?
E.g. a a new module named SampleModule should be created. I put the empty manifest file SampleModule.psd1 in the directory <%PSModulePath%>\SampleModule. (It doesn’t matter which (user or global) module path is used).
This is enough for PowerShell to list my new module with the Get-Module -ListAvailable command.
In the next step I try to fill the manifest and set the ModuleToProcess property to an assembly, which is located in another directory. Calling Import-Module fails, PowerShell cannot find the assembly.
The
Get-Modulecmdlet with the-ListAvailableparameter works nice. The problem was the architecture, i.e. 32-bit PowerShell host could not list 64-bit modules…