Adding a generic service to cluster from powershell

倖福魔咒の 提交于 2019-12-04 16:53:10
Chesky

I had the same problem; I had to add a large amount of services and got stuck with the "ServiceName" as well.

First, a note on the Add-ClusterGenericServiceRole command: this is for creating the service resource and the role at the same time, as opposed to just adding the service resource to an existing role.

Now, the solution is that you have to set the parameter "ServiceName" with the Set-ClusterParameter command. You can do this for an existing service resource like this:

Get-ClusterResource "ServiceDisplayName" | Set-ClusterParameter -Name ServiceName -Value "ServiceName"

However, you probably want to create the resource with everything it needs in one go, like this:

Add-ClusterResource -Name "ServiceDisplayName" -Group "cluster role" -ResourceType "Generic Service" | Set-
ClusterParameter -Name ServiceName -Value "ServiceName"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!