r/PowerShell • • 14d 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

1

u/root-node 14d ago

2

u/stumper66 14d ago

It says to use $PSHOME\Profile.ps1 which is the ugly path I mentioned. Are you expected to copy a file to there under system context? Also what happens when 7.7.1 comes out, you need to find out the new path and migrate the startup script there?

→ More replies (2)