Search code examples
powershellwmicluster-computingwindows-server-2008-r2hyper-v

Unable to create Generic Service in cluster using WMI script


I want to create a Cluster Generic Service using script. We have Windows Server 2008 R2 with Hyper-V. Am using Add-ClusterGenericServiceRole command Now i am facing 2 problems.

  1. When executing it simply with service name I am getting this error enter image description here
  2. I provided "-StaticAddress" to the command and then executed again but again getting error enter image description here

Also I am able to create the service from UI using the same cluster disk, IP, etc. I am admin on the server and have full access to cluster.


Solution

  • Not sure what the problem was.. I removed all the disks from storage and then again added.

    Used the same command and it worked

    Add-ClusterGenericServiceRole -ServiceName "<SERVICE NAME>" -Storage "Cluster Disk <NUMBER>" -Name <CLUSTER NAME> –StaticAddress <IP ADDRESS>