title: Add a Windows Slave
body: <p>I have a Jenkins Master running on Linux and I want to add a Windows Slave.
  Currently I am not able to start the slave:</p>
  
  <p>1) Java Web Start</p>
  
  <p>-> Java Web Start is removed in JDK 11 (and was never part of OpenJDK), so as we want to switch our Jenkins to run with openjdk11, this won't work anymore, so I did not even try this.</p>
  
  <p>2) Windows Slave Plugin</p>
  
  <p>-> I followed the <a href="https://wiki.jenkins.io/display/JENKINS/Windows+agents+fail+to+start+via+DCOM" rel="nofollow noreferrer">Troubleshootings</a> and made sure ports 135, 139 and 445 are reachable from my Jenkins master.
  Sadly, I still receive an error:</p>
  
  <pre><code>2019-06-12 14:54:28] [windows-slaves] Connecting to 1.2.3.4
  ERROR: Message not found for errorCode: 0xC0000001
  org.jinterop.dcom.common.JIException: Message not found for errorCode: 0xC0000001
      at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:121)
      at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:479)
      at org.jinterop.dcom.core.JIComServer.&lt;init&gt;(JIComServer.java:427)
      at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
      at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:208)
      at hudson.slaves.SlaveComputer$1.call(SlaveComputer.java:294)
      at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:71)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: jcifs.smb.SmbException: Failed to connect: 0.0.0.0&lt;00&gt;/1.2.3.4
  jcifs.util.transport.TransportException
  java.net.SocketException: Connection reset
      at java.net.SocketInputStream.read(SocketInputStream.java:210)
      at java.net.SocketInputStream.read(SocketInputStream.java:141)
      at jcifs.util.transport.Transport.readn(Transport.java:29)
      at jcifs.smb.SmbTransport.peekKey(SmbTransport.java:388)
      at jcifs.smb.SmbTransport.negotiate(SmbTransport.java:288)
      at jcifs.smb.SmbTransport.doConnect(SmbTransport.java:319)
      at jcifs.util.transport.Transport.run(Transport.java:241)
      at java.lang.Thread.run(Thread.java:748)
  
      at jcifs.util.transport.Transport.run(Transport.java:258)
      at java.lang.Thread.run(Thread.java:748)
  
      at jcifs.smb.SmbTransport.connect(SmbTransport.java:309)
      at jcifs.smb.SmbTree.treeConnect(SmbTree.java:156)
      at jcifs.smb.SmbFile.doConnect(SmbFile.java:911)
      at jcifs.smb.SmbFile.connect(SmbFile.java:954)
      at jcifs.smb.SmbFile.connect0(SmbFile.java:880)
      at jcifs.smb.SmbFileInputStream.&lt;init&gt;(SmbFileInputStream.java:77)
      at jcifs.smb.SmbFileInputStream.&lt;init&gt;(SmbFileInputStream.java:66)
      at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2844)
      at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:90)
      at rpc.Stub.attach(Stub.java:104)
      at rpc.Stub.call(Stub.java:109)
      at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:119)
      ... 11 more
  </code></pre>
  
  <p>Does anyone have a suggestion? Or an alternative to the two mentioned approaches?</p>
  
  <hr>
  
  <p>Edit:</p>
  
  <p>I have to mention that the master is running on-prem and the slave is a Azure VM. There is an ExpressRoute and, as I said, ports (135, 139, 445) are open (telnet from master to slave was successful for these ports).</p>