r/PowerShell • • 13d ago

Question PowerShell 7.7 - All users profile script location

Starting with PowerShell 7.7 it is now a windows app and if you install it with Add-AppxPackage, then it will live in "C:\Program Files\WindowsApps\Microsoft.PowerShell_7.7.0.0_x64__8wekyb3d8bbwe"

On previous versions I had profile.ps1 live in "C:\Program Files\PowerShell\7"
However not only do I suspect the bin directory will change with each new version, it is now read-only for everything except system, you can't put any files in there without hacking it with system privileges.
Where do they expect us to put all user scripts now?

81 Upvotes

24 comments sorted by

View all comments

8

u/Flettys 13d ago

No PSModulePath release in 7.7 either.

That's a nasty list of known issues, and as-always the unknown issues must be 10x or more.

3

u/Alaknar 13d ago

No PSModulePath release in 7.7 either.

Wait, what? How does it import modules then?

2

u/Flettys 13d ago

Same as ever.

The planned change (now for 7.8) is to move the default user-scoped path from My Documents -> LocalAppData (blame OneDrive KFM for breaking My Documents in the first place) and make it more easily configurable.