栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

从jenkins在远程服务器(Windows)上运行批处理脚本

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

从jenkins在远程服务器(Windows)上运行批处理脚本

如果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提示。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/413355.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号