I'm not sure if this proper forum or if I should be using the API forum. Please move it if needed.
When using PowerCLI, it's easy to get the used & total IPs of an external network, but I don't see how get the used IPs for org networks.
Getting used / total IPs for external networks
$externalNetwork = Get-ExternalNetwork 'network'
$externalNetwork.TotalIpCount
473
$externalNetwork.UsedIpCount
470
Org networks don't have the TotalIpCount or UsedIpCount properties. I'm able to get the info from vCenter Orchestrator with the org network method getAllocatedAddresses().
I can get the allocated IP using other methods, but I'm looking for something quick like with external networks.
Here are the methods and properties for external and org networks.
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> externalNetwork | gm
TypeName: VMware.VimAutomation.Cloud.Impl.V1.ExternalNetworkImpl
Name MemberType Definition
---- ---------- ----------
ConvertToVersion Method T ConvertToVersion[T]()
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
IsConvertableTo Method bool IsConvertableTo(type toType)
ToString Method string ToString()
ToVDPortgroup Method System.Collections.Generic.IEnumerable`1[[VMware.VimAutomation.Vds.Interop.V1.VDPortgroupInterop, VMware.VimAutomation.Vds.Int...
ToVirtualPortGroup Method System.Collections.Generic.IEnumerable`1[[VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroupBase, VMware.Vi...
Description Property System.String Description {get;}
DnsSuffix Property System.String DnsSuffix {get;}
ExtensionData Property System.Object ExtensionData {get;}
Gateway Property System.Net.IPAddress Gateway {get;}
Href Property System.String Href {get;}
Id Property System.String Id {get;}
Name Property System.String Name {get;}
Netmask Property System.String Netmask {get;}
PrimaryDns Property System.Net.IPAddress PrimaryDns {get;}
SecondaryDns Property System.Net.IPAddress SecondaryDns {get;}
StaticIPPool Property VMware.VimAutomation.Cloud.Types.V1.IPRangeList StaticIPPool {get;}
TotalIpCount Property System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] TotalIpCount {g...
UsedIpCount Property System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] UsedIpCount {get;}
VlanId Property System.Nullable`1[[System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]] VlanId {get;}
PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $orgNetwork | gm
TypeName: VMware.VimAutomation.Cloud.Impl.V1.OrgNetworkImpl
Name MemberType Definition
---- ---------- ----------
ConvertToVersion Method T ConvertToVersion[T]()
Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
IsConvertableTo Method bool IsConvertableTo(type toType)
ToString Method string ToString()
ToVDPortgroup Method System.Collections.Generic.IEnumerable`1[[VMware.VimAutomation.Vds.Interop.V1.VDPortgroupInterop, VMware.VimAutomation.Vds.Int...
ToVirtualPortGroup Method System.Collections.Generic.IEnumerable`1[[VMware.VimAutomation.ViCore.Types.V1.Host.Networking.VirtualPortGroupBase, VMware.Vi...
Description Property System.String Description {get;}
DnsSuffix Property System.String DnsSuffix {get;}
ExtensionData Property System.Object ExtensionData {get;}
ExternalNetwork Property VMware.VimAutomation.Cloud.Types.V1.ExternalNetwork ExternalNetwork {get;}
Gateway Property System.Net.IPAddress Gateway {get;}
Href Property System.String Href {get;}
Id Property System.String Id {get;}
Name Property System.String Name {get;}
Netmask Property System.String Netmask {get;}
NetworkPool Property VMware.VimAutomation.Cloud.Types.V1.NetworkPool NetworkPool {get;}
NetworkType Property VMware.VimAutomation.Cloud.Types.V1.OrgNetworkType NetworkType {get;}
Org Property VMware.VimAutomation.Cloud.Types.V1.Org Org {get;}
PrimaryDns Property System.Net.IPAddress PrimaryDns {get;}
SecondaryDns Property System.Net.IPAddress SecondaryDns {get;}
StaticIPPool Property VMware.VimAutomation.Cloud.Types.V1.IPRangeList StaticIPPool {get;}
Thanks.