This is helpful: http://jenkins.361315.n4.nabble.com/PowerShell-plug-in-question-td1468725.html
After that it's the usual troubleshooting script issues from different runtime contexts. On Thursday, December 13, 2012 1:06:13 PM UTC-6, mwpowellhtx wrote: > > Hello, > > We've got some Windows PowerShell scripts I would like to expose > throughout our jobs for natural house keeping steps. > > I've got the Set-ExecutionPolicy set appropriately and I can run scripts > apart from Jenkins through the command line, with PowerShell (i.e. context > menu), etc. > > Running through the PowerShell task doesn't work at all, it fails. I try > as a Windows Batch Command task, the command is nothing special. > > powershell.exe -File "<path-to-powershell-script/>" "<arg0/>" "<arg1/>" > > > However, when I run the Job I get the following error: > > File <path-to-powershell-script/> cannot be loaded because the execution of > scripts is disabled on this system. Please see "get-help about_signing" for > more details. > > > Now, is the Jenkins process somehow signing the wrappers it puts around > such scripts? We've got the execution policy set otherwise, which if it's a > conflict, then perhaps we abandon PowerShell altogether for something more > "conventional" like Batch or Command files. > > We've got the PowerShell scripts today, so obviously if I can get them to > work, I want to do that. But if I need to rewrite them as batch files, then > I'll do that instead. > > Thanks in advance.. > > Regards, > > Michael >