Is there a way to change PowerShell module installation folder (the folder that modules are placed after Install-Module)? This is why I want to do this:
- I'm on Windows 10, PowerShell 5.1.17763.503
- My default installation folder is
Documents\WindowsPowerShell\Modules - My Documents folder have been moved to a location containing
,symbol (corporate policies) - PS has a bug loading .ps1 that contain classes and have
,in the file path (similar to this issue.)
What I've tried:
- I thought the installation folder is the first folder in the $env:PSModulePath and I can change it. When I've opened "Edit System Environment Variables" I saw the installation folder is not in the
$env:PSModulePath. It's automatically added on the variable when you start PowerShell.