Setting up windows server 2016 as agent fails

I have a windows server 2016 (Not part of a domain) which I am trying to setup as an agent in Jenkins. I have picked “Let Jenkins control this Windows as a Windows service”. I installed JDK 17 and provided the Admin login to Jenkins. On Windows I disabled the local FW. The Windows host is on the same network as Jenkins controller. When I try to connect I get this error:

[2024-03-22 11:53:57] [windows-agents] Connecting to 172.24.68.209
ERROR: [2024-03-22 11:53:57] [windows-agents] Access is denied. See https://github.com/jenkinsci/windows-slaves-plugin/blob/bc4648caf770590e7361e8bbc8cd42a4d9a0bde0/docs/troubleshooting.adoc for more information about how to resolve this.
org.jinterop.dcom.common.JIException: Message not found for errorCode: 0x00000005
	at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:572)
	at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:481)
	at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:445)
	at org.jvnet.hudson.wmi.WMI.connect(WMI.java:59)
	at hudson.os.windows.ManagedWindowsServiceLauncher.launch(ManagedWindowsServiceLauncher.java:203)
	at hudson.slaves.SlaveComputer.lambda$_connect$0(SlaveComputer.java:298)
	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: rpc.FaultException: Received fault. (unknown)
	at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:141)
	at rpc.Stub.call(Stub.java:113)
	at org.jinterop.dcom.core.JIComServer.init(JIComServer.java

I then went through all the items listed in that github page. Nothing seems to help. I do know that port 135 is open. The TCPDUMP idea showed me that its connecting just fine and not hitting any closed ports.

Because of how I have Jenkins setup I do not believe I can do JNLP or Websockets. I have NGINX forwarding port 443 to 8080 for jenkins.

Any one have any suggestions?

The windows-slaves-plugin is deprecated and should not be used. You will need to use something like the ssh-build-agent plugin and install SSH on the Windows system. Microsoft changed the way that DCOM works and the project did not want to take on the required changes (it would require significant work to update the DCOM library for the new changes). See the notice of deprecation here: WMI Windows Agents