I need to run a few PowerShell scripts during installation, but I'm having problems running PowerShell from a runProgram action.
If I create a runProgram action that runs PowerShell directory I see an error dialog with contents like this,
Problem Event Name: PowerShell
ThreadName: Consol.. main thread
OS Version: 6.1.7601.2.1.0.272.7
Locale ID: 2057
To work around this I have tried running PowerShell by running it through cmd.exe like this,
<programArguments>/C ' powershell.exe -File "<path to script>"' </programArguments>
Does anyone know what might cause the error and what the ' correct' way to run PowerShell scripts is?
Running powershell through cmd seems to work, but I would like to understand why I can't run it directly.
did you resolve this issue?
I'm also trying to run a Powershell script and am not getting any output and the test run hangs at creating a shortcut link.
I've added requestedExecutionLevel but it hasn't made any difference.