I'm learning PowerShell and I'm trying to build my own module library.
I've written a simple module XMLHelpers.psm1
and put in my folder $home/WindowsPowerShell/Modules
.
When I do:
import-module full_path_to_XMLHelpers.psm1
It works. But when I do:
import-module XMLHelpers
It doesn't work and I get the error:
Import-Module : The specified module 'xmlhelpers' was not loaded because no valid module file was found in any module directory.
I've checked that the environment variable PSModulePath
contains this folder. As it is a network folder, I've also tried to move it to a local folder and to modify PSModulePath
but without success
$env:PSModulePath=$env:PSModulePath+";"+'C:\local'
Any idea on what could cause this issue?