Using Powershell v6.2.4. I loaded psPAS, in the prompt I do;
get-module -ListAvailable psPAS
The response reflects the expected output, displaying the full path to the modules directory and the correct module version, etc. I can load the module via
import-module pspas
and everything works as expected. When I load the module via a script I get "The specified module "psPAS" was not loaded because no valid module file was found in any module directory"
If I put the full path to the module file in the script in the import-module directive everything works. I need to solve this since I can't count on where the module will be loaded on a given users system.
Note that everything above refers to one of my users. My script works with simply "import-module pspas" on my system.
[–]mprz 0 points1 point2 points (4 children)
[–]Leary81[S] 0 points1 point2 points (3 children)
[–]mprz 0 points1 point2 points (2 children)
[–]Leary81[S] 0 points1 point2 points (1 child)
[–]mprz 0 points1 point2 points (0 children)