Install PowerShell Core according to guidelines: dotnet tool install --global PowerShell
$PROFILE is updated to C:\Users\me\Documents\PowerShell\Profile.ps1
C:\Users\me\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 (location and file does not exist and unable to edit $PROFILE)
PS ~ > $PSVersionTable
Name Value
---- -----
PSVersion 6.2.3
PSEdition Core
GitCommitId 6.2.3
OS Microsoft Windows 10.0.19035
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
PS ~ >
C:\Users\me\Documents\PowerShell\Microsoft.PowerShell_profile.ps1 _is_ the correct path:
The PowerShell-only name is in the _parent_ folder name (PowerShell vs. WindowsPowerShell).
Microsoft.PowerShell still applies (note: _Microsoft_, not _Windows_) - it is based on the regular console host's $ShellId value, which hasn't changed.
_Update_: Additionally, as implied by @iSazonov's comment below, PowerShell neither creates the $PROFILE itself nor does it ensure its directory's existence.
You should manually create the path and file.
This issue has been marked as answered and has not had any activity for 1 day. It has been closed for housekeeping purposes.
Most helpful comment
You should manually create the path and file.