- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 09:30 AM
I have the following line in a MID Server Powershell script file:
D:\putty\pscp.exe -v -i D:\keys\private_key.ppk D:\temp\*.txt $scp_destination
When the script is executed by the MID server, it hangs when it gets to the above line. Any idea why? Anyway I can debug it?
Running the Powershell script in a Powershell window (i.e. ./myScript.ps1) works well.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 01:56 AM
Changing the service account under which the MID server was running solved the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2024 10:14 PM
Below links could be useful :
https://stackoverflow.com/questions/13686686/does-pscp-work-with-powershell
You can refer above links and try with the methods suggested.
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2024 01:33 PM
Unfortunately it did not help. The MID server is installed on a Windows server. When I login onto it and execute the Powershell script myself, the files are correctly sent over to the other machine using pscp.
When the Powershell script is executed by the MID server after being triggered by a Servicenow instance, it hangs when it hits the pscp command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2024 01:56 AM
Changing the service account under which the MID server was running solved the problem.