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

Posted By:   Berend
Posted On:   Wednesday, December 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?

Re: Cannot execute Powershell Task

Posted By:   Berend  
Posted On:   Thursday, December 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