问题描述
我们在一个服务器场设置中有2个项目应用程序服务器。
we have 2 project application servers in a single farm set-up.
我们有一个启动请求并停止"项目申请服务"使用来自远程服务器的Powershell。
We have a request to start and stop "Project Application Service" using Powershell from an remote server.
我们知道我们可以使用以下命令:"Start-SPServiceInstance -Identity""启动和停止服务,虽然我们需要通过RDP登录两台服务器并运行命令。
We know that we can use the following commands: "Start-SPServiceInstance -Identity" to start and stop the service, though we need to login in two servers thru RDP and run the command.
有没有办法可以将服务器名称作为参数提供给上面的命令?
Is there a way where we can provide the server name as a parameter to the above command?
推荐答案
要找出身份执行以下命令
To find out the identity execute following command
get-SPserviceinstance
get-SPserviceinstance
查找Project Server应用程序服务并复制ID
Look for Project Server Application Service and copy the ID
执行以下命令以停止服务
Execute following command to stop the service
Stop-SPServiceinstance -identity {此处粘贴ID}
Stop-SPServiceinstance -identity {paste ID here}
启动服务
开始 - Spserviceinstance -identity {paste ID here}
Start-Spserviceinstance -identity {paste ID here}
这篇关于Powershell命令用于在场设置中停止Project Application Service的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!