Powershell构建脚本-从任何计算机执行它
我们在powershell中编写了构建脚本。它在专用的构建机器中 现在,我想从我的机器上执行powershell脚本,而无需通过mstsc登录到构建机器 此外,除了我之外,其他人不应该执行构建脚本 是否可以从任何其他计算机在生成计算机中调用我的powershell脚本Powershell构建脚本-从任何计算机执行它,powershell,build-automation,powershell-2.0,Powershell,Build Automation,Powershell 2.0,我们在powershell中编写了构建脚本。它在专用的构建机器中 现在,我想从我的机器上执行powershell脚本,而无需通过mstsc登录到构建机器 此外,除了我之外,其他人不应该执行构建脚本 是否可以从任何其他计算机在生成计算机中调用我的powershell脚本 如何实现它?答案是Powershell远程处理:http://powershellremoting.codeplex.com/您必须在专用生成计算机上启用ps远程处理 您可以执行启用PsRemoting(和/或winrm quic
如何实现它?答案是Powershell远程处理:
http://powershellremoting.codeplex.com/
您必须在专用生成计算机上启用ps远程处理
您可以执行启用PsRemoting
(和/或winrm quickconfig
)
现在,您可以执行以下操作:
invoke-command -computer $buildBox -command { hostname }
因此,使用
invoke命令
,您可以在远程框上运行脚本。在回答部分,有人向您提问