VDS and 3rd Party VDS Info

Version 1

    People are often suprised to hear that PowerCLI display information on both a vSphere Distributed Virtual Switch and 3rd Party VDS solutions such as the Cisco Nexus 1KV can be retrieved from PowerCLI, the below is an example using the native PowerCLI cmdlets which will pull information from both....

     

    Get-VirtualSwitch -Distributed | Foreach {
        $Details = New-Object -TypeName PSObject -Property @{
            VDSName = $_.Name
            VDSDescription = $_.ExtensionData.Summary.Description
            VDSModel = $_.ExtensionData.Summary.ProductInfo.Name
            VDSVendor = $_.ExtensionData.Summary.ProductInfo.Vendor
            VDSBuild = $_.ExtensionData.Summary.ProductInfo.Build
            VDSBundleId = $_.ExtensionData.Summary.ProductInfo.BundleID
            VDSVersion = $_.ExtensionData.Summary.ProductInfo.Version
            NumPorts = $_.ExtensionData.Summary.NumPorts
            NumDVPortGroups = @($_ | Get-VirtualPortGroup).Count
            NumHosts = @($_.ExtensionData.Summary.HostMember).Count
            NumVMs = @($_.ExtensionData.Summary.Vm).Count
        }
        $Details | Select VDSName, VDSDescription, VDSVendor, VDSModel, VDSBuild, VDSBundleID, VDSVersion, NumPorts, NumDVPortGroups, NumHosts, NumVMs
    }

     

    Example output:

     

    VDSName         : VSM
    VDSDescription  : Cisco_Nexus_1000V_136945814
    VDSVendor       : Cisco Systems Inc.
    VDSModel        : Cisco Nexus 1000V
    VDSBuild        : 00000
    VDSBundleId     : VEM400-201101030-RG
    VDSVersion      : 4.0
    NumPorts        : 160
    NumDVPortGroups : 11
    NumHosts        : 3
    NumVMs          : 1
    
    VDSName         : dvSwitch-01
    VDSDescription  : This is a VMware Distributed Virtual Switch
    VDSVendor       : VMware
    VDSModel        : DVS
    VDSBuild        : 00000
    VDSBundleId     : 
    VDSVersion      : 4.1.0
    NumPorts        : 128
    NumDVPortGroups : 2
    NumHosts        : 1
    NumVMs          : 1