Calling powershell scrip within winbatch?

Started by kle2, February 07, 2025, 08:09:40 AM

Previous topic - Next topic

kle2

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

td

Search this forum for user spl's posts on the subject. There are examples on the Tech Database site as well.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

kle2

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!