Hi,
I am currently trying to do CI for databases using flywayDB, where I need 
powershell in Jenkins. I have a jenkins setup which works fine with a linux 
and windows machines, tested a basic poweshell commands in ajob and it 
works like a charm. 
In my CI scenario, I have a Win 2K12 Box with sql 2012 remoting 
enabled (this is not a slave and I don't want it to be) , I can 
run powershell script or code directly from my laptop or the jenkins 
machine inside ISE against, one of the statements is

> Import-Module sqlps -DisableNameChecking 
>
> as I need to navigate and work with sql server . When running the same 
code from jenkins job  always this statement blow up the job as follows





> Import-Module : The specified module 'sqlps' was not loaded because no 
> valid module file was found in any module directory.
>
>

 which works fine when I run  it in ISE. I invoke the command with admin 
credentials as follows

 
$password = ConvertTo-SecureString "mypassword" -AsPlainText -Force

$cred= New-Object System.Management.Automation.PSCredential (
"mydomain\myuser", $password ) 

Enter-PSSession -ComputerName SQL2K12 -Credential $cred


 

Thanks for your help

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/85ecde10-c47f-4189-b08f-7bcabce1d6da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to