I have a powershell script which will run a long test remotely. The test will be running there for few hours. See code like below.
Invoke-Command -ComputerName $remoteIP -Credential $credential -ScriptBlock {
param ($runTestFolder,$runtestPath,$testsuiteOption)
if ($(Test-Path -Path $runtestPath) -eq $false) {
Write-Error "Run_Test.exe is not found from the path specified. "
return "ERROR_RUN_TEST.EXE_DO_NOT_EXIST"
}
cmd /c "cd $runTestFolder && $runtestPath /s $testsuiteOption"
return "COMPLETED."
} -ArgumentList $runTestFolder,$runTestPath,$TestSuiteOption
But after about two hours, it throw this error. How do I debug it? I checked "about_Remote_Troubleshooting" but it does not mention the error code at all.
Processing data for a remote command failed with the following error message: Error with error code 14 occurred while calling method WSManPluginReceiveResult. For more information, see the about_Remote_Troubleshooting Help topic.