Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Get-NsxSecurityGroupEffectiveVirtualMachine returns null objects #623

Open
McGreggor opened this issue May 19, 2020 · 1 comment
Open

Get-NsxSecurityGroupEffectiveVirtualMachine returns null objects #623

McGreggor opened this issue May 19, 2020 · 1 comment

Comments

@McGreggor
Copy link

McGreggor commented May 19, 2020

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
Copy link
Contributor

Hi,

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants