Erwin Pombett
asked on
how can i import module from my Doc/WindowPS/Modules when i started PS ISE as an admin ?
I need to start my PS iSE as administrator.
My modules are in my user path. when i pass the command
Get-Module -ListAvailable
i dont have the list for my user.
i dont want to move my modules to a different location.
how can I import my modules ?
thank you in advance.
Toshi
My modules are in my user path. when i pass the command
Get-Module -ListAvailable
i dont have the list for my user.
i dont want to move my modules to a different location.
how can I import my modules ?
thank you in advance.
Toshi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
It's fine not to have anything as the result of [Environment]::GetEnvironm entVariabl e('PSModul ePath','Us er'). By default that is blank.
As I mentioned, first you have to check $env:PSModulePath. Is your path there?
If it's already there, then you don't have to add it. The set command doesn't produce any output.
Have you tried the following command?
Get-Module -ListAvailable -All
Did you read the last link I provided? Do you have the folders named correctly for your modules?
As I mentioned, first you have to check $env:PSModulePath. Is your path there?
If it's already there, then you don't have to add it. The set command doesn't produce any output.
Have you tried the following command?
Get-Module -ListAvailable -All
Did you read the last link I provided? Do you have the folders named correctly for your modules?
ASKER
ok, every thing is working, i added the path to the PSModulePath and things are ok.
ASKER
thank you for your reply,
if i use the following line the $p value is empty.
$p = [Environment]::GetEnvironm
i can fill the $p as follows:
$p=$env:PSModulePath.
samething for filling the PSModulePath back, i can only doit with
$env:PSModulePath=$p.
is it normal that i can not doing it the way you paste it.
both following command doesn't output any error when passed.
$p = [Environment]::GetEnvironm
[Environment]::SetEnvironm
do you have any idea that could avoid your commands to pass on my PSISE ?
thank you in advance.