Powershell script execution

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
mnaeem
Junior Coder
Posts: 29
Joined: Wed Mar 10, 2021 5:05 pm

Powershell script execution

Post by mnaeem » Tue Oct 18, 2022 12:35 pm

Hello Great People,

I want to call the PowerShell script and pass it some command line arguments and I want to receive the response from that PowerShell Script inside my MS Script.

Please find the picture https://1drv.ms/u/s!AoNHROZr6p0Pkx3Ua-_ ... B?e=xMxeLg. This is what I want to receive inside my MS script.

So far I am able to figure out that to execute the PowerShell I can use the RunProgram function, however I am confused how can I get the response back from my Powershell Script inside my MS Script.

Please guide me what are my options.

Thanks

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Powershell script execution

Post by ocnuybear » Wed Oct 19, 2022 8:25 am

Have a look here:
viewtopic.php?f=9&t=10972&p=46751&hilit ... ell#p46751

Using clipboard to send info between powershell and MS.

mnaeem
Junior Coder
Posts: 29
Joined: Wed Mar 10, 2021 5:05 pm

Re: Powershell script execution

Post by mnaeem » Thu Oct 20, 2022 5:47 am

Hi Ocnuybear,

Such a great solution but I managed my issue by storing the file on the disk and reading it by the MS script.

So far it looks like it’s working fine.

Indeed the solution you suggested is great I will use it in my next step.

Appreciate your timely help.

Regards

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts