Share via

PowerShell script to create Cluster dynamic group

Jan Pastyřík 6 Reputation points
2021-07-26T16:49:43.597+00:00

Hello Community,

I would like to ask for help about VSAE. I am using Kevin Holman´s fragments. In one of them we have alredy filtered Windows Computers based on AD filter. We also find relations using this hostnames to verify if any hostname participate in cluster group. We have also cluster group name filtered in array.

  • the think is about defining discovery to create dynamic group containing cluster name.... cluster name is only short one. No FQDN but discovery block for Microsoft.Windows.Computer require full name... $instance = $DiscoveryData.CreateClassInstance("$MPElement[Name='Windows!Microsoft.Windows.Computer']$")
    $instance.AddProperty("$MPElement[Name='Windows!Microsoft.Windows.Computer']/PrincipalName$", $clustername)
    $instance.AddProperty("$MPElement[Name='System!System.Entity']/DisplayName$", $clustername)
    $DiscoveryData.AddInstance($instance)

Can somebody help me how to solve this?

thank you
Jan

System Center Operations Manager
System Center Operations Manager

A family of System Center products that provide infrastructure monitoring, help ensure the predictable performance and availability of vital applications, and offer comprehensive monitoring for datacenters and cloud, both private and public.


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.