We recently got some new Windows Server 2019 machines and I want to add them to our Jenkins setup. The problem is: executing any external program causes an error. docker login, git status, java -version all give an error like this
[TestPowershell] $ powershell.exe -NonInteractive -ExecutionPolicy ByPass "& 'C:\Users\XXX~1\AppData\Local\Temp\3\jenkins1416755497082623783.ps1'"
java : java version "1.8.0_101"
At C:\Users\XXX-sa\AppData\Local\Temp\3\jenkins1416755497082623783.ps1:1 char:1
+ java -version
+ ~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (java version "1.8.0_101":String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Java(TM) SE Runtime Environment (build 1.8.0_101-b13
)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)
Notifying upstream projects of job completion
Finished: SUCCESS
Tried it on the server itself, works fine. All the setup is the same as our 2016 servers, which dont present this issue
EDIT: I setup a vanilla master on VM 2019 and it works without this error, still presents the error with a 2016 master.