Cannot execute Powershell Task
1 posts in topic
Thread View Thread View
TOPIC ACTIONS:
 

Cannot execute Powershell Task...
Berend
Wed Dec 18, 2013 09:05 AM

This is the code snippet of my build file:
  <exec dir="." executable="powershell" os="Windows 7" timeout="1000" failonerror="false">
   <arg line="./ReadConfiguration"/>
  </exec>

The execution fails with an output saying that the execution of scripts is deactivated on my system.
However the execution policy is set to "Unrestricted" and executing the script directly from command line works fine.
Can anybody help me?

  Found a solution: &...

Berend
Thu Dec 19, 2013 01:27 AM

Found a solution:
  <exec dir="." executable="powershell" os="Windows 7" timeout="1000" failonerror="false" outputproperty="configdata">
   <arg line=" -executionPolicy Unrestricted ./ReadConfiguration"/>
  </exec>

Anyway it seems a bit strange to tell a script to assume an unrestricted executionPolicy

About | Sitemap | Contact