winrs parity: -d[irectory]:PATH — starting directory for the remote shell.
Context
The fluent API already supports this — CommandRequest.workingDirectory(String), honored when the remote shell is created (the client's first command) — but the CLI does not expose it: a CLI run always starts in %USERPROFILE%.
Proposal
winrm-java -h server -u 'DOMAIN\user' -pf pw.txt \
-d 'C:\build' exec build.cmd
Acceptance criteria
- Option parsed and passed through to the request; wire assertion that the Create shell request carries
rsp:WorkingDirectory (FakeWsmanServer).
- Usage error when the value is missing or blank.
- Documented in the CLI manual options table.
🤖 Generated with Claude Code
Context
The fluent API already supports this —
CommandRequest.workingDirectory(String), honored when the remote shell is created (the client's first command) — but the CLI does not expose it: a CLI run always starts in%USERPROFILE%.Proposal
-d, --directory <path>on thecommandsubcommand (and the futureshellsubcommand, Command stdin and interactive shell: stdin() on the builders, RemoteProcess.stdin(), and a CLI shell subcommand #136), mapped straight toworkingDirectory(...).-dis currently free (the hostname short option is-h); keep--directoryas the long form.Acceptance criteria
rsp:WorkingDirectory(FakeWsmanServer).🤖 Generated with Claude Code