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!
|