RUNNING POWRSHELL SCRIPTS FORM DOS BATCH SCRIPT

Hi,

How can I call a powershell script from within a DOS batch script ( . bat ) file ?

Thanks

Ireshad

July 8th, 2013 10:20am

Hi,

You can do this using like the following in your shell script (batch file):

Free Windows Admin Tool Kit Click here and download it now
July 8th, 2013 10:29am

Hi Ireshad,

You can use -File to specify which file should be run. Save this as a batch file:

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -File C:\Scripts\Script.ps1

Here's some additional information on other switches that you may need:

http://ss64.com/ps/powershell.html

July 8th, 2013 10:31am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics