Skip to content

Releases: MetricsHub/winrm-java

v2.0.00

Choose a tag to compare

@github-actions github-actions released this 29 Jul 17:37

Important

Version 2.0.00 is a complete overhaul of the library. The Apache CXF / SMBJ stack is gone, replaced by a purpose-built WSMan client with zero runtime dependencies, a new fluent WinRMClient API, and a full command-line interface shipped as a standalone executable JAR. Java 11+, as before.

🪶 Zero runtime dependencies

  • The dependency-free "light" WinRM backend — introduced behind a toggle in #109 — is now the only implementation (#127). No more CXF, Jakarta XML, HttpComponents or SMBJ on your classpath, and no more JAXP/classloader conflicts when embedding the library in larger applications.
  • File uploads no longer use SMB: files are transferred through the WinRM command shell itself (#120), so only the WinRM port (5985/5986) is needed — port 445 can stay closed.
  • Fixed along the way: the CXF thread leak on WinRMService close (#85) and offline WSDL schema resolution (#82), for those who tracked these issues on the 1.x backend.

✨ New fluent WinRMClient API

One client authenticates once and runs any number of WQL queries and commands over the same connection (#133):

try (WinRMClient client = WinRMClient.builder("server01.acme.com")
        .credentials("ACME\\admin", password)
        .build()) {
    CommandResult result = client.command("ipconfig /all").run();
    QueryResult processes = client.wql("SELECT Name FROM Win32_Process").run();
}
  • Typed results and an unchecked WinRMClientException hierarchy: WinRMAuthenticationException, WinRMFaultException (with WSMan fault code and detail), WinRMTimeoutException, WqlSyntaxException.
  • Streaming terminals: stream() and start() return a live RemoteProcess to consume stdout/stderr as the command runs (#134).
  • stdin and interactive sessions: stdin() builders and RemoteProcess.stdin() (#144).
  • Command output is decoded as UTF-8 — the library no longer guesses the remote code page (#143).

The 1.x entry points (WinRMWqlExecutor, WinRMCommandExecutor, …) still work — see the breaking changes below for the few behavioral differences.

🖥️ New: command-line interface

winrm-java-2.0.00-standalone.jar is a single executable JAR (#118) with wql, command, upload and an interactive shell subcommand (#144) — NTLM or Kerberos, HTTP or HTTPS. See the CLI manual.

java -jar winrm-java-2.0.00-standalone.jar -h server01 -u 'ACME\admin' -pf pwd.txt command ipconfig

⚠️ Breaking changes when upgrading from 1.x

  • TLS certificates are now validated (the CXF client silently trusted everything). HTTPS connections to hosts with self-signed certificates fail during the handshake unless you add the certificate (or its CA) to a Java trust store, or disable validation with -Dorg.metricshub.winrm.tls.insecure=true (testing only).
  • Collections returned by WinRMWqlExecutor.getHeaders()/getRows() and WqlQuery.getSelectedProperties()/getSubPropertiesMap() are now unmodifiable views — copy before mutating.
  • The remote transfer directory is renamed from SEN_ShareFor_<HOST>$ to <windir>\Temp\winrm-upload-<HOST> (#151). Old directories are not reused or cleaned up, the SMB share created by WindowsTempShare.getOrCreateShare(...) is no longer hidden (no trailing $), and generated file names now use the winrm- prefix instead of SEN_.
  • A few CXF/SMB-only public types were removed with the legacy backend.

The full migration notes are in the README.

📚 Documentation

  • The documentation site was rewritten from scratch (#125): authentication, TLS, timeouts and errors, and the CLI manual.
  • New Preparing the Windows Host guide (#149): required privileges, why local administrator accounts are often denied, non-admin configuration, and a troubleshooting table.

🔧 Under the hood

  • The build is now gated on all quality checks, with every SpotBugs, PMD and CPD finding fixed (#126, #129, #130 — thanks @anuragpaul602-netizen).
  • Mockito is gone: tests run against fakes and a FakeWsmanServer (#132), and the project builds on modern JDKs.
  • Prettier was replaced by formatter-maven-plugin (#114).

New Contributors

Full Changelog: v1.1.02...v2.0.00

v1.1.02

Choose a tag to compare

@github-actions github-actions released this 03 Apr 12:16

What's Changed

  • Release v1.1.01 and prepare v1.1.02-SNAPSHOT by @github-actions in #48
  • Bump org.junit:junit-bom from 5.11.4 to 5.12.1 by @dependabot in #54
  • Bump org.apache.cxf:cxf-rt-frontend-jaxws from 4.1.0 to 4.1.1 by @dependabot in #53
  • Bump org.apache.cxf:cxf-codegen-plugin from 4.1.0 to 4.1.1 by @dependabot in #52
  • Bump org.apache.cxf:cxf-rt-transports-http-hc from 4.1.0 to 4.1.1 by @dependabot in #51
  • Bump com.sun.xml.ws:jaxws-rt from 4.0.2 to 4.0.3 by @dependabot in #49
  • Issue #55: Rebrand Codebase from Sentry Software to MetricsHub by @SafaeAJ in #56

Full Changelog: v1.1.01...v1.1.02

v1.1.01

Choose a tag to compare

@github-actions github-actions released this 17 Feb 12:34

What's Changed

  • Release v1.1.00 and prepare v1.1.01-SNAPSHOT by @github-actions in #47
  • Bump com.hierynomus:smbj from 0.11.1 to 0.14.0 by @dependabot in #38
  • Bump javax.xml.bind:jaxb-api from 2.2.12 to 2.3.1 by @dependabot in #43
  • Bump org.junit:junit-bom from 5.10.1 to 5.11.4 by @dependabot in #41
  • Bump org.apache.cxf:cxf-rt-frontend-jaxws from 3.5.0 to 4.1.0 by @dependabot in #44

New Contributors

Full Changelog: v1.1.00...v1.1.01

v1.1.00

Choose a tag to compare

@github-actions github-actions released this 13 Feb 17:13

What's Changed

  • Release v1.0.01 and prepare v1.1.00-SNAPSHOT by @github-actions in #20
  • Updated POM to be oss-parent based. Started at version 2. by @ChristopheClermont in #24
  • Issue #45: Security Vulnerabilities with CXF Dependencies (Upgrade to Version 3.5.10) by @SafaeAJ in #46

New Contributors

Full Changelog: v1.0.01...v1.1.00

v1.0.01

Choose a tag to compare

@github-actions github-actions released this 26 Jan 10:38

What's Changed

  • Release v1.0.00 and prepare v1.0.01-SNAPSHOT by @github-actions in #10
  • Issue #11: Fix Unsupported Operation Exception when using CiscoUCSRest request using CLI by @MedMaalej in #12
  • Issue #15: Update all references of sentrysoftware.github.io to sentrysoftware.org by @kawtarBK9 in #16
  • Issue #18: Update workflows to use @v3 instead of @main by @kawtarBK9 in #19

New Contributors

  • @github-actions made their first contribution in #10
  • @MedMaalej made their first contribution in #12
  • @kawtarBK9 made their first contribution in #16

Full Changelog: v1.0.00...v1.0.01

v1.0.00

Choose a tag to compare

@github-actions github-actions released this 05 Jan 13:59

What's Changed

New Contributors

Full Changelog: https://github.com/sentrysoftware/winrm/commits/v1.0.00