I think the solution to your problem is posted here: 
http://blog.richardszalay.com/2009/10/22/executing-powershell-from-cruisecontrol-net-on-64-bit-windows/

On Tuesday, June 30, 2009 2:06:39 PM UTC+2, Helmut wrote:
>
> We have a similar setup and I have not had any problems running my 
> PowerShell scripts from CC.  Here is a copy of one of the code blocks: 
>
>     <exec> 
>       <executable>C:\WINDOWS\system32\windowspowershell 
> \v1.0\powershell.exe</executable> 
>       <baseDirectory>C:\PowerShell\</baseDirectory> 
>       <buildArgs>.\RecycleAppPool.ps1 alphaweb1</buildArgs> 
>       <buildTimeoutSeconds>40</buildTimeoutSeconds> 
>     </exec> 
>
> The only difference I notice is that you use the full path were I am 
> using the .\ . Also, my execution policy is set to RemoteSigned. 
>
> Helmut. 
>
> On Jun 30, 7:46 am, Frank Innes <[email protected]> wrote: 
> > CCNet was and is configured to run as a service under a domain account 
> > from which the same command entered at a command prompt runs without 
> > error.  Does anyone have any other ideas? 
> > 
> > -Frank Innes 
> > 
> > On Jun 26, 3:09 pm, Ruben Willems <[email protected]> wrote: 
> > 
> > 
> > 
> > > Hi 
> > 
> > > if you're running ccnet as a service, 
> > > try setting the use under which it runs to the same as you use when 
> you log 
> > > on. 
> > > --> change from localSystem to UserX 
> > 
> > > with kind regards 
> > > Ruben Willems 
> > 
> > > On Fri, Jun 26, 2009 at 5:33 PM, Frank Innes 
> > > <[email protected]>wrote: 
>
> > 
> > > > PowerShell scripting is already to Unrestricted, and the script runs 
> > > > fine from the command line.  It appears that the CCNet service can't 
> > > > retrieve this setting from the Windows Registry during a build.  Are 
> > > > there any other suggestions? 
> > 
> > > > -Frank Innes 
> > 
> > > > On Jun 24, 9:12 pm, Craig <[email protected]> wrote: 
> > > > > This is an issue from PowerScript - a quick search found this 
> page: 
> > > >
> http://www.codeplex.com/PsObject/Wiki/View.aspx?title=Execution%20Pol.... 
> > 
> > > > > From the looks of things, it is due to a restriction within 
> > > > > PowerShell, but it is changeable (assuming you'd want to!) The 
> other 
> > > > > approach appears to be to sign the scripts. 
> > 
> > > > > Craig- Hide quoted text - 
> > 
> > > - Show quoted text -- Hide quoted text - 
> > 
> > - Show quoted text -

Reply via email to