Run powershell script for remoting on MID server

Manasi Marathe
Tera Contributor

I am trying to run a powershell script on MID server for transferring a file from MID to an external server using flow and action. I am using script step to insert cmd on ecc queue for MID server and am not using the powershell step since I do not want to enter separate connection and credential details in Servicenow for MID server.

 

When I run the powershell script directly on MID server in an interactive session, file transfer works successfully. However, when I trigger the flow with script action, I observe the below error which states that access for PSremoting is denied.

 

Connecting to remote server "remote_server" failed
with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic.

 

Kindly help me troubleshoot the issue further.

11 REPLIES 11

vermaamit16
Kilo Patron

Hi @Manasi Marathe 

 

Are you using Copy-Item in your PowerShell script to copy the file ?

 

Thanks & Regards

Amit Verma

Yes Amit. I am using copy-item after pssession.

thanks Amit.

However, given links suggest creating PSSessionConfiguration and CredSSP which can cause vulnerabilities. Is there any other troubleshooting that can be done from Servicenow end?