WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: kle2 on February 07, 2025, 08:09:40 AM

Title: Calling powershell scrip within winbatch?
Post by: kle2 on February 07, 2025, 08:09:40 AM
I have a powershell script name test.ps1.  I can excecute the script by going to powershell command prompt and run the test.ps1 from there.  The script will output the result onto a text file name output.txt 

PS C:\> ./test.ps1 > output.txt

How do I call the powershell script within Winbatch?

Thank you,
kle2
Title: Re: Calling powershell scrip within winbatch?
Post by: td on February 07, 2025, 10:26:35 AM
Search this forum for user spl's posts on the subject. There are examples on the Tech Database site as well.
Title: Re: Calling powershell scrip within winbatch?
Post by: kle2 on February 10, 2025, 05:23:41 AM
Quote from: td on February 07, 2025, 10:26:35 AMSearch this forum for user spl's posts on the subject. There are examples on the Tech Database site as well.

Thanks, TD!