Configurable user-profile loading: WINRS_NOPROFILE is hardcoded (winrs -noprofile)
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 68/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- java
- Domain
- backend-api-design, cli, documentation, testing
Research direction
Start at Envelopes.createShell and trace the existing working-directory pinning and shell recreation flow. Then inspect the command and shell CLI parsing, plus commands.md and cli.md, and add or update tests for the Create option, pinned replay, and CLI behavior. Done means profile loading remains off by default, can be requested per shell, replays after recreation, and its non-admin failure is documented.
Written by the indexing model from the issue text.
Description
winrs parity:
-nop[rofile]— except our polarity is reversed: winrs loads the profile by default and-noprofileturns it off; this client hardcodesWINRS_NOPROFILE=TRUEin the shell Create options, so the profile is never loaded and there is no way to ask for it.
Context
Envelopes.createShell always sends:
<wsman:Option Name="WINRS_NOPROFILE">TRUE</wsman:Option>
That is the safe default — winrs's load-the-profile default fails for users who are not local administrators on the target — but some commands genuinely need the user profile (HKCU hive, %APPDATA%, per-user PATH), and today they cannot have it.
Proposed API
CommandResult result = client.command("reg query HKCU\Software\...")
.loadUserProfile() // shell-scoped, like workingDirectory: first command pins it
.execute();
Keep NOT loading the profile as the default — it is both the current behavior and the choice that works for non-admin users.
CLI
--profile on command (and shell, #136):
winrm-java -h server -u 'DOMAIN\user' -pf pw.txt --profile exec 'echo %APPDATA%'
Requirements
- Shell-scoped setting with the same pinning semantics as the working directory (replayed with its original value when a reaped shell is silently recreated).
- Document the failure mode: requesting the profile as a non-admin typically faults — the fault surfaces through the normal
WinRMFaultExceptionpath with its code and detail. - Tests: wire assertion of the option value on Create, pinned replay on recreation, CLI parsing; docs (commands.md + cli.md).
🤖 Generated with Claude Code
- Dominant language
- Java
- Stars
- 11
- Forks
- 4
- Avg merge
- 5d 5h
- Merged PRs (30d)
- 6
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from MetricsHub/winrm-java
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
MetricsHub/winrm-java#148 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
MetricsHub/winrm-java#147 ·
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
MetricsHub/winrm-java#146 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
MetricsHub/winrm-java#145 ·
-
Kerberos credential delegation: allowDelegation() and CLI --allow-delegate (winrs -allowdelegate) Open
Difficulty 4/5 3-5 days Newbie friendliness 48/100
MetricsHub/winrm-java#141 ·
All issues in MetricsHub/winrm-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 1/5 Under an hour Newbie friendliness 94/100
objectionary/hone-maven-plugin#1061 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
spring-projects/spring-modulith#1895 ·