vmware-archive / powernsx

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

Get-NsxSecurityGroupEffectiveVirtualMachine returns null objects #623

Open McGreggor opened 4 years ago

McGreggor commented 4 years ago

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`

alagoutte commented 4 years ago

Hi,

i think it is because, all field is return by the API...