Skip to content

Move PS content out of OneDrive #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jshigetomi
Copy link

This pull request proposes a new RFC (RFC0066) to change the default location of PowerShell user content on Windows machines from OneDrive to the AppData directory. The goal is to align PowerShell with other developer tools and improve usability by preventing unnecessary syncing issues.

Key changes include:

  • Introduction of RFC0066 to move PowerShell user content to the AppData directory on Windows.
  • Specification of the new directory structure in AppData and the creation of a configuration file to manage the user scoped PSModulePath.
  • Allowing users to customize the location of PowerShell user content, with certain directories being non-configurable.
  • Providing an example script to relocate existing PowerShell content to the new location.

Copy link
Contributor

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are many more comments and questions I want to add. But start with these changes.

Copy link
Contributor

@sdwheeler sdwheeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More comments

@iSazonov
Copy link
Contributor

iSazonov commented Apr 8, 2025

The file should have .md extension.

@SteveL-MSFT SteveL-MSFT changed the title Add initial draft Move PS content out of OneDrive Apr 30, 2025
@jshigetomi jshigetomi marked this pull request as ready for review June 16, 2025 19:22
Copy link
Contributor

@JustinGrote JustinGrote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just needs some consistency on the path naming and clarification on cross platform path consistency which is one of the most critical components of this.

- A configuration file in the PowerShell user content folder will determine the location of the user
scoped **PSModulePath**.
- By default, the PowerShell user content folder will be located in the
`$env:LOCALAPPDATA\Microsoft\PowerShell`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not consistent with The proposed Directory Structure below. It should be updated to:
$env:LOCALAPPDATA\PowerShell


```json
{
"UserPSContentPath" : "$env:LOCALAPPDATA\\PowerShell\\PSContent",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will the Linux existing CurrentUser modulepaths, etc. be updated to also use this? Will there be a migration approach? I don't like the idea of disparate paths per OS, should follow the XDG standard for both.
https://specifications.freedesktop.org/basedir-spec/latest/

# PowerShell User Content Location

This RFC proposes moving the current PowerShell user content location out of OneDrive to the
`AppData` directory on Windows machines.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not consistent with below, should be LocalAppData

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants