I have some groups that were created via the API which created two dymanic queries for each group. I now no longer need one of those dynamic queries but if i edit the groups in the GUI only one of the dynamic queries appears and its not the one i need to delete. How can i delete the query via the API.
This is the script used to create the groups :-
$values = New-Object string[] 3
$values[0] = "Group1"
$values[1] = "Group2"
$values[2] = "Group3"
foreach ($value in $values){
$members = @(
@{ Name = "$value AP"; Definition = "filter:/Orion.WirelessHeatMap.AccessPoints[Contains(DisplayName,'$value')]" }
@{ Name = "$value NotPrimaryOrBackup"; Definition = "filter:/Orion.Nodes[CustomProperties.Service_Location='$value' AND CustomProperties.Device_PrimaryOrBackup!='Primary' AND CustomProperties.Device_PrimaryOrBackup!='Backup']" })
$groupId = (Invoke-SwisVerb $swis "Orion.Container" "CreateContainer" @(
"$value LANGroup","Core",60,0,"Created by the RL© PowerShell script","true",
([xml]@(
"<ArrayOfMemberDefinitionInfo xmlns='">schemas.solarwinds.com/.../Orion'>",
[string]($members |% {
"<MemberDefinitionInfo><Name>$($_.Name)</Name><Definition>$($_.Definition)</Definition></MemberDefinitionInfo>"
}
),
"</ArrayOfMemberDefinitionInfo>"
)).DocumentElement
)).InnerText
}
Thanks