Hi,
I need to add a dynamic Query to 1000 groups which were created using Powershell. I have the scripts that were used to create the groups, but i cant work out how update a group or add a query to an existing group.
This is the script that was used to create the groups
$members = @(
@{ Name = "PD9_Query"; Definition = "filter:/Orion.Nodes[CustomProperties.Service_Location='PD9']" })
$groupId = (Invoke-SwisVerb $swis "Orion.Container" "UpdateContainer" @(
"PD9_Routers","Core",60,2,"Created by the GS© PowerShell script","true",
([xml]@(
"<ArrayOfMemberDefinitionInfo xmlns='http://schemas.solarwinds.com/2008/Orion'>",
[string]($members |% {
"<MemberDefinitionInfo><Name>$($_.Name)</Name><Definition>$($_.Definition)</Definition></MemberDefinitionInfo>"
}
),
"</ArrayOfMemberDefinitionInfo>"
)).DocumentElement
)).InnerText
Could anyone advise on what changes i need to make to just update the existing groups?
Thanks