psm1 file not recognized by Import-Module

Hi, I started to experiment the modules in powershell, created a very basic Greetings.psm1 one and placed it in

I double checked my $env:psmodulepath, it contains 4 paths, one of them the one mentioned above.
C:\Program Files\WindowsPowerShell\Modules
C:\Program Files [x86]\Microsoft SQL Server\120\Tools\PowerShell\Modules
Doing a

Get-Module -ListAvailable
PS lists all modules in the 3rd and 4rth directories but not the psm1 found in my user powershell directory Is there any specific config needs to be done in order to make the module available apart from dropping it in one of the directories (I even dropped it in C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ it did not show neither

Thanks for your help

The .psm1 can’t go into the \Modules folder. You need to create a subfolder.


The subfolder name and .psm1 filename (e.g., “MyModule”) must match.

Thanks Don, absolutly correct, it is working now