PowerShell / PowerShell/PSResourceGet
Request to change default installation path for user modules
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
Description
Summary of the new feature / enhancement
In the latest versions of OneDrive, the Documents folder is synchronized by default. This creates challenges for PowerShell users. Some might not want modules to "roam" between machines. In other cases, an organizational "My" folder always contains two spaces in the name following the pattern "OneDrive - OrgName". The spaces require using an 8.3 folder name or putting the path in quotations, which is extra work.
A community-suggested workaround is to move the default module path. The discussion resolved the best location to be ~/AppData/Local/PowerShell/Modules. The PowerShell committee has discussed and agrees with the approach and acknowledges that multiple steps in a coordinated effort will be required to reach the end goal without breaking compatibility.
https://github.com/PowerShell/PowerShell/issues/15552
Proposed technical implementation details (optional)
Two options for consideration, regarding Install-PSResource:
1 - Add a new parameter -InstallPath and set the default to $Env:HOMEPATH\AppData\Local\PowerShell\Modules.
2 - Just change the path where modules are installed to $Env:HOMEPATH\AppData\Local\PowerShell\Modules, without adding a parameter.
Additional options and considerations are welcome. If this is accepted, PWSH could add the path to PSModulePath (in addition to the existing) in a near-term release.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked PowerShell issue #15552 and the Install-PSResource implementation that determines the default module installation path. Compare the proposed -InstallPath option with changing the default directly, then confirm that the selected approach preserves compatibility and supports the planned PSModulePath update.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100