powershell - 设置在 Linux 上运行的 Jenkins 来执行 PowerShell 脚本

标签 powershell jenkins jenkins-plugins windows-server-2008

如何设置在 Linux 上运行的 Jenkins,以便在没有密码提示的情况下在远程 Windows Server 2008 上执行 PowerShell 脚本。

Linux 上的 Master Jenkins/Windows 上的 Slave。这行得通吗?

最佳答案

在Windows服务器上安装SSH服务器,并使用公钥/私钥对进行身份验证。在 Linux 上,您可以运行

ssh -i <private key file> user@host "command"

在服务器上发出“命令”。

关于powershell - 设置在 Linux 上运行的 Jenkins 来执行 PowerShell 脚本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39509246/

相关文章:

jenkins - 管道中的 channel 关闭异常

docker - 如果 Docker Pipeline Plugin withRun 命令返回非零退出代码,我如何使 Jenkins 构建失败?

jenkins - 如何在Jenkins中使用Job DSL插件删除脚本?

java - Groovy Classpath 上的 Jenkins 包?

windows - 检查是否使用 PowerShell 安装了特定应用程序

powershell - Invoke-WebRequest中的SessionVariable参数

powershell - 安装 PowerShellGet 模块

jenkins - 使用 SSH 跳转主机配置 Jenkins

testing - 在 Jenkins 中解析和显示测试结果的最简单插件

powershell - 为什么 PowerShell 返回一个新行?