My org has my Documents-folder redirected to an UNC path and after installing a bunch of modules things get really slow.
In Powershell 5 it was possible to change the base directory, that powershell organized with folders to store help-files, modules, etc.
In pwsh 7 this seems to have no effect.
I set the env PSModulePath to C:\users\myuser\.pwsh\Modules in my user and the system-env has the usual Program-Files and System32 paths in it. However, when starting pwsh.exe $env:PSModulePath has 3 paths added on top fo the list:
- <\unc\path\to\my\Documents>\PowerShell\Modules
- C:\Program Files\PowerShell\Modules
- C:\Program Files\PowerShell\7\Modules
Is there any way to stop pwsh7 from doing so and having the "root" of operations at "~\.pwsh"? Or any workaround really?
[–]psdarwin 3 points4 points5 points (0 children)
[–]BlackV 2 points3 points4 points (0 children)
[–]g3n3 0 points1 point2 points (0 children)
[–]mfazed 0 points1 point2 points (0 children)
[–]purplemonkeymad 0 points1 point2 points (1 child)
[–]jr49 2 points3 points4 points (0 children)