如果Windows上的Jenkins在* nix上远程,则使用
plink.exe(本质上是命令行
PuTTy)
如果Jenkins在Windows上,而在Windows上,则使用psexec.exe
如果Jenkins在 nix上,而远程在 nix上,则使用
ssh
如果Windows上* nix上的Jenkins远程(更新2015年1月)Ansible
http://docs.ansible.com/intro_windows.html支持从unix
/ linux机器https:/调用Windows命令,例如powershell。/github.com/ansible/ansible-
examples/blob/master/windows/run-
powershell.yml
告诉我涉及了哪些操作系统(包括Jenkins和远程操作系统),我将进一步介绍。
编辑:
下载页面用于 psexec.exe
列出所有命令行选项。您将需要一些类似的东西:
psexec \remotecomputername -u remoteusername -p remotepassword cmd /c <yourcommands here>
替换
<your commands here>为实际命令,就像在命令提示符下执行它们一样。
请注意,
psexec首先需要安装服务,并需要提升的命令提示符/管理员远程凭据才能安装。
另外,您需要运行
psexec -accepteula一次以接受EULA提示。



