Load Module Problem~~
hi all,
when invoke "import-module -name xxxx" get exception "because no valid module file found in module directory"
my psmodulepath :
e:\document\documents\windowspowershell\modules;c:\windows\system32\windowspowershell\v1.0\modules\
i create folder "terry" in e:\document\documents\windowspowershell\modules
then save script
function hello(){"hello"}
export-modulemember -function *
to test.psm1
but when import-module -name test ,it catches exception
i invoke get-module -listavailable
the output :
moduletype name exportedcommands
---------- ---- ----------------
manifest pscx {}
manifest applocker {}
manifest bitstransfer {}
manifest psdiagnostics {}
manifest troubleshootingpack {}
and "test" module
oh,my god,
in either case, path folder referred base of module (modulebase), , name of script, binary, or manifest module file should same module folder name
thanks alll
Windows Server > Windows PowerShell
Comments
Post a Comment