My all-users profile used to live under the PowerShell installation directory. With the PowerShell 7.7 app package, that directory is protected and its path includes the package version. Is there another place for a profile that runs for every user?
Where should the all-users profile go with packaged PowerShell 7.7?
Answers
For the app-package installation, the all-users profile is still under $PSHOME. The package directory is immutable, and the proposed custom location for enterprise configuration did not make it into 7.7. So there isn't a writable replacement location for that profile in this release.
Run $PROFILE | Select-Object * to see the four profile paths for your current session. AllUsersAllHosts points to profile.ps1 under $PSHOME, while AllUsersCurrentHost is the host-specific file in the same directory.
Reply to this answer
For managed machines, a practical workaround is to deploy a standard profile to each user's CurrentUserAllHosts or CurrentUserCurrentHost location with Group Policy. Pick the first if it should apply across hosts, or the second if it's only for a particular host.
That's per-user deployment, not a true all-users profile, so you'll need to account for maintaining the copies.
Reply to this answer
If you need the existing all-users profile setup and don't need anything specific from 7.7, staying on 7.6 LTS is another option. That avoids making the package directory writable or tying your setup to a versioned WindowsApps path.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_a93!drelviko.7:
That explains why the documented path still points into the package. Thanks.