FYI - I have found the Get-NsxSecurityGroupEffectiveVirtualMachine cmdlet will return a null object when parsing output from Get-NsxSecurityGroup if one of the groups doesn't contain VMs, i.e one with just IPsets in my case.
If you create a security group with just IPsets, then run:
(Get-NsxSecurityGroup | Get-NsxSecurityGroupEffectiveVirtualMachine).vmname | % {"$_"}
Hi,
FYI - I have found the Get-NsxSecurityGroupEffectiveVirtualMachine cmdlet will return a null object when parsing output from Get-NsxSecurityGroup if one of the groups doesn't contain VMs, i.e one with just IPsets in my case.
If you create a security group with just IPsets, then run:
(Get-NsxSecurityGroup | Get-NsxSecurityGroupEffectiveVirtualMachine).vmname | % {"$_"}
I get a result along the lines of
`vmname1 vmname2 vmname3
vmname4 vmname5`