Forced run PS from specific location

Hi Gurus.

I would like powershell to run and pull modules from specific location Like C:\program file\powershell\modules. , I have some env. variables entries and always pick the one for user profile. how can I accomplish this . how can I force powershell to onlu use one path

as you can see I am very new

If there’s a specific module you want to import you can import it by path

Import-Module "c:\program files\powershell\modules\mymodule\mymodule.psm1"

If you want to change the order of your PSModulePath environment variable you’d had to redefine it with the paths you want in order.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.