vmware-archive / powernsx

PowerShell module that abstracts the VMware NSX-v API to a set of easily used PowerShell functions
173 stars 90 forks source link

Remove-nsxSecurityGroupMember doesn't work on Excluded Members #566

Open NamedJason opened 5 years ago

NamedJason commented 5 years ago

This command:

Invoke-XpathQuery -QueryMethod SelectSingleNode -Node $_SecurityGroup -query "child::member[objectId="$MemberMoref"]"

only returns members, not excluded members. This means that this cmdlet cannot be used to remove excluded members from a security group. I don't know how to access the appropriate parameter of the $_SecurityGroup object, otherwise I'd try to fix it myself and submit a pull request, sorry.

NamedJason commented 5 years ago

Oh, I see that the XpathQuery is case sensitive, so it looks like child::excludeMember will pick it up... let me see what I can do with that...