Tuesday, June 4, 2013

Call powershell from batch file

Here is the small example of how to call powershell script file from batch file.

"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -command "< Path of your ps1 file>"

NOTE : Here you need to put -command , If not batch file will just load the ps1 file will not execute.

No comments:

Post a Comment