cancel
Showing results for 
Search instead for 
Did you mean: 
Create Post
Level 12

Powershell to create dynamic query

Using the powershell SDK group creation am try to create one script for my environment to create group sub group and some nodes need to assign.

unable to pass "like" function.

If i pass Caption='$Group' in the below snippet then its working fine but i need the contain or starting with function if i mention LIKE then its not working please help me in this.

Below is to create dynamic query using powershell

Below one i tried with LIKE is not working

$subgroupmembersSW = @(

    @{ Name = "Subgroup"; Definition = "filter:/Orion.Nodes[Caption LIKE '$G']"}

    )

Labels (3)
0 Kudos
2 Replies
Level 10

Aloha...

Could this be because you do not have the * in your variable?  Maybe add to the front and back of the variable you are passing.

https://support.solarwinds.com/SuccessCenter/s/article/Use-node-filters

Mahalo...

Jason

0 Kudos

* will take a strong in group filter. I got the answer thank you for the reply.
0 Kudos