释放任务以在远程计算机上运行脚本 [英] Release Task to Run a script on a Remote Machine

查看:119
本文介绍了释放任务以在远程计算机上运行脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能关注的对象,

提前感谢您抽出时间阅读本文。

Thanks in advance for your time in reading this post.

我想要作为我的CI发布阶段的一部分,在远程服务器(而不是域)上执行PowerShell脚本。

I'm wanting to execute a PowerShell script on a remote server (not on domain) as part of my C.I.'s Release phase.

我能够在目标计算机上添加"PowerShell"。任务到发布,我可以让它工作,但只有在关注此网站后,在远程计算机上设置自签名证书,然后将其导入构建服务器:

I am able to add the "PowerShell on Target Machines" task to the release and I can get it to work but only after following this website to setup a Self-Signed Certificate on the remote machine and then import it into the build server:

https: //4sysops.com/archives/powershell-remoting-over-https-with-a-self-signed-ssl-certificate /

https://4sysops.com/archives/powershell-remoting-over-https-with-a-self-signed-ssl-certificate/

 这似乎太过分了在每个服务器上只需执行一个小型PowerShell脚本。

 This simply seems like way too much to do on every single server to simply execute a small PowerShell script.

我的问题:在远程计算机上停止/启动某些IIS站点和/或服务的最简单方法是什么TFS发布?  如果是"目标计算机上的PowerShell"是一个简单的解决方案那么为什么我必须走到极端,在我推送的每个盒子上设置
自签式证书?  我错过了什么并且过于复杂了吗?

My question:  what is the easiest way to Stop/Start some IIS Sites and/or Services on a remote machine as part of a TFS Release?  If "PowerShell on Target Machines" is a simple solution then why do I have to go to the extremes to setup a Self-Signed Certificate on every box I push to?  Am I missing something and over-complicating this?

非常感谢提前,

John

推荐答案

嗨mozzarella,

Hi mozzarella,

有一个扩展来停止/启动IIS网站:

There is an extension to stop/start IIS Website:

https://marketplace.visualstudio.com/items?itemName=Lemoinek.IISutilities

您可以下载并安装到您的收藏中。然后你可以找到"IIS实用程序"。 Utility选项卡中的任务。

You could download it and install to your collection. Then you could find "IIS utilities" task in the Utility tab.

最好的问候


这篇关于释放任务以在远程计算机上运行脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆