Class WindowsRemoteProcessUtils

java.lang.Object
org.metricshub.winrm.WindowsRemoteProcessUtils

public class WindowsRemoteProcessUtils extends Object
  • Method Details

    • getWindowsEncodingCharset

      @Deprecated(since="2.0.00", forRemoval=false) public static Charset getWindowsEncodingCharset(WindowsRemoteExecutor windowsRemoteExecutor, long timeout) throws TimeoutException, WqlQuerySyntaxException, WindowsRemoteException
      Deprecated.
      Not the charset of remote command output, and never was: CodeSet is the remote machine's ANSI code page, while cmd.exe writes its output in the console (OEM) code page — the two differ on every non-English locale. Command output is now decoded with WindowsRemoteExecutor.SHELL_OUTPUT_CHARSET, the code page the remote shell is created with. Use this method only to decode data that a Windows application genuinely wrote in the ANSI code page.
      Get the CharSet from the Win32_OperatingSystem CodeSet. (if not found by default Latin-1 windows-1252)
      Parameters:
      windowsRemoteExecutor - WindowsRemoteExecutor instance
      timeout - Timeout in milliseconds.
      Returns:
      the encoding charset from Win32_OperatingSystem
      Throws:
      TimeoutException - To notify userName of timeout
      WqlQuerySyntaxException - On WQL syntax errors
      WindowsRemoteException - For any problem encountered on remote
      See Also:
    • buildNewOutputFileName

      public static String buildNewOutputFileName()
      Builds a new output file name, with 99.9999999% chances of being unique on the remote system
      Returns:
      file name