Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get-Module -ListAvailable doesn't display my module

I've created a module manifest .psd1 file and I've used Test-ModuleManifest on it which returns nicely and shows the two CmdLets in the binary C# .dll.

The manifest file is in a folder under c:\Program Files\WindowsPowerShell\Modules but when I run Get-Module -ListAvailable it is not showing.

If I run Get-Module it is not showing.

If I run one of the CmdLets then the module is automatically imported and shows when I next run Get-Module.

What am I misunderstanding?? Why doesn't it show as available?

Update

Just done this again with a script module, psm1 and psd1 on a different machine, and same problem. It doesn't show as available and yet posh-git which seems to be setup in a similar way, does.

like image 536
Luke Puplett Avatar asked Oct 18 '22 03:10

Luke Puplett


1 Answers

Okay, the script module does now show up after I fixed a version inconsistency between the version in the manifest and the subfolder name I'd placed it in.

Came in handy:

Test-ModuleManifest
like image 135
Luke Puplett Avatar answered Oct 31 '22 13:10

Luke Puplett