r/PowerShell • u/stumper66 • 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
View all comments
56
u/jborean93 13d ago •
Unfortunately it's a known limitation, you can't edit anything in
$PSHomeas they are immutable for MSIX packages, and the work to enable a custom location never landed in 7.7 (see enterprise configuration https://github.com/PowerShell/PowerShell/issues/27565#issuecomment-6802573646).You have a few options:
C:\Program Files\PowerShell\7(or any location really)None are great but not too much you can do