Remote powershell script works in Powershell, but not from Designer


I have a Powershell script to run some remote commands to a server in another domain.

The script works perfectly from Powershell and Powershell ISE, on the same server as the job is sent from, but when applying it as a script in Designer, i get "access denied" when running it in Jobqueue.
This means I reach the destination from the server..

Note that Firewall is OK, WinRM is OK, trustedhosts is OK. The script in general works perfectly fine in Powershell.

Can it be the server function in the process step malfunctioning? Im using SQL Processing server.
Also having ScriptComponent - ScriptExec as process task.

Parents Reply
  • Sorry I was unclear in the last comment. I was just thinking out loud.

    I'll try to explain it again:
    - I have a process which generates the powershellscript in ParameterValue0 (using "thescript.Appenline(powershellcode)") and passes this to a script component 

    - The same code directly in Powershell from the server that is our jobserver works fine. I can only run the remote powershellscript from that spesific jobserver, as there are FW openings etc implemented.

    - I run the script from this server in Powershell and it works as it should.

    Then to the part where I get confused:

    - When i generate the Event named Event1 from Object browser, it's being processed in the jobqueue. The result is a Frozen process with the error message, access to the remote server <IP> is denied. 

    The error occurs when running the script from One Identity. But concidering the error message, the script is triggered and I get the response from the REMOTE computer, but with access denied. This made me think that maybe the script component is triggered from another server in One Identity and not the job server.

    So my question is: When running a scriptcomponent, is it being sent from the Jobserver or another server, like SQL?

    Hope this makes it more clear?