How to run the powershell script from a mid server using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:21 AM
We are working on a integration with solarwinds where the incidents created by the solarwinds alerts are closed manually then the alert in the solarwinds should also get closed. To achieve this am using the flow designer and powershell script.
But this is not working, The PowerShell script action I have created is always returning "RPC server not found". Also i can see in the integration meta data that the mid server name is constantly changing. Is there any way I can define a single mid server and the script execution happens through that every time? if not how does the flow chooses the mid server to run this activity?
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:39 AM
Hello Akshay,
Did you place the powershell script in the scripts folder under midserver?
And how are you executing the script? Are you using eccqueue?
Check this link where i have shown sample code on how to call a powershell script from SN instance.
Mark the comment as a correct answer and helpful if it helps to solve the problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 04:48 AM
Hi Asif,
The PowerShell script is in the mid server script files(ecc_agent_script_file) table. The script is executed through the flow designer(we have the integration hub plug in activated. it gives the option to create a new action for powershell script execution).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2020 05:05 AM
Ah okay.
Based on the error it looks liek the powershell script is trying to connect to your external server but getting an error. Check if there is any firewall restriction in connecting to your 3rd party server. Try running that PS script manually on the mid server powershell prompt and check once.
Mark the comment as helpful/correct if it helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2023 11:51 AM
Hi,
I am trying the same approach and getting the error : The MID script file 'scripts\PowerShell\\*******' doesn't exist. Can you please tell me why.
Thanks,
Sowmya