View Single Post
Old 29th August 2016, 11:23   #2
th_mi
Member
 
Join Date: Sep 2005
Location: Sitting next to my desk
Posts: 56
You need to call the powershell executable with the scritpname as parameter.

exec "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -file d:\mydir\myscript.ps1"

But you should keep in mind on a 64 bit system there is a 32 bit and a 64 bit powershell installed. It may make a difference what powershell you are using depending on what the script is doing and if you are also using snapins, ....

This signature is currently on vacation!
th_mi is offline   Reply With Quote