mise activation fails for powershell 5.1 #4151
Unanswered
danf-s1
asked this question in
Troubleshooting and bug reports
Replies: 1 comment 6 replies
-
You should use pwsh 7.4 lts instead of powershell 5.1 as the current implementation #3506 uses C# api's such as System.Management.Automation.LocationChangedEventArgs that require powershell at least 7.2 You can also check out the installing mise powershell |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I haven't been able to get mise to activate in my PowerShell 5.1 session, so I've had to fall back to the shim method.
Tested with the latest v2025.1.8, installed manually by extracting
.\mise
toc:\Program Files\
and addingc:\Program Files\mise\bin
to the PATH variable.The documentation for PowerShell seems like it has repeated commands (mise activate twice) and doesn't work for PowerShell 5.1: https://mise.jdx.dev/installing-mise.html#powershell
echo '~/.local/bin/mise activate mise activate pwsh | Out-String | Invoke-Expression' >> $HOME\Documents\PowerShell\Microsoft.PowerShell_profile.ps1
When I update the command to run in my environment and for PowerShell 5.1 as such:
echo 'mise activate pwsh | Out-String | Invoke-Expression' >> $HOME\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
The results are several errors when opening a new PowerShell 5.1 session:
The third error seems to be due to a space in the mise path. If I move the mise binary path location to a path without spaces, I only get the first two errors. This path issue is impacting both PowerShell 5.1 and PowerShell 7.4. The activation issue only impacts PowerShell 5.1.
Beta Was this translation helpful? Give feedback.
All reactions