[FEATURE] Powershell default to 5.1 or add option to use 5.1
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Windows 11 is shipped with Powershell 5.1 by default. Claude Code defaulting to Powershell 7.x when using Powershell tool writes scripts that are not portable (especially for RMM software).
I write a lot of powershell scripts that have to be portable and usable with RMM software. I have tried to use Powershell tool by setting it as default one (instead of bash) and it caused many problems, most importantly - scripts lost compatibility and portability.
I have run adversarial agents that test both versions and general resolution was: more problems than solutions.
PS 7.x is not compatible with PS 5.1, these are totally different technologies. Different data folders, module paths, different credential stores.
I always ask Claude Code to do research and find edge cases of tool usage deliberately, find places where Claude is not sure then test them then write skills for them. Claude admitted - PS 7.x is very bad for portability.
Proposed Solution
- Implement compatibility with 5.1 (that is default on Windows 11)
- Add option to choose which version of Powershell we want to use 5.1 or 7.x.
- Maybe default to 5.1 not 7.x at least until Microsoft switches to 7.x as default one.
Alternative Solutions
n/a
Priority
High - Significant impact on productivity
Feature Category
Configuration and settings
Use Case Example
Write any powershell script that is then copy and pasted into Acronis Cyber Protect Cloud service.
Then run on other machines as system or user.
Additional Context
none, the topic is simple - portability, compatibility, usability
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗