System: Windows Server 2012 R2 | PowerShell v4 | Jenkins v1.607 | 64-Bit Java Version 8u60
For whatever reason, I am able to login to the Windows server that Jenkins is running on, and execute the following code without issues:
Start-Job -Credential $Creds -ScriptBlock {Get-Process}
Get-Job | Wait-Job | Receive-Job
Upon trying to execute the same code within a Jenkins job, utilizing the PowerShell plugin, with the same user credentials I was using in $Creds, it fails without any helpful information. Credentials have been verified. This is the error that I get:
[localhost] The background process reported an error with the following message: .
+ CategoryInfo : OpenError: (localhost:String) [], PSRemotingTransportException
+ FullyQualifiedErrorId : 2100,PSSessionStateBroken
I used the Resolve-Error function, as found here, to try and get more information. Here was the output:
writeErrorStream : True
PSMessageDetails :
Exception : System.Management.Automation.Remoting.PSRemotingTransportException: The background process
reported an error with the following message: .
TargetObject : localhost
CategoryInfo : OpenError: (localhost:String) [], PSRemotingTransportException
FullyQualifiedErrorId : 2100,PSSessionStateBroken
ErrorDetails : [localhost] The background process reported an error with the following message: .
InvocationInfo :
ScriptStackTrace :
PipelineIterationInfo : {}
00000000000000000000000000000000000000000000000000000000000000000000000000000000
ErrorCode : 2100
TransportMessage :
ErrorRecord : The background process reported an error with the following message: .
StackTrace :
WasThrownFromThrowStatement : False
Message : The background process reported an error with the following message: .
Data : {}
InnerException :
TargetSite :
HelpLink :
Source :
HResult : -2146233087
Still no helpful information. I'm at a loss as to what may be the issue, and have no idea how to proceed.