8 Replies Latest reply on Feb 12, 2020 12:31 AM by sivagndl

    Get list of VDPortGroup for each datacenter and cluster

    COS Master

      I need to get a list of VDPortGroups from each datacenter and eac cluster in my vCenter server called "Junkyard".

      I need the output to be formatted in a table like below....

            

       

      vCenterServerDatacenterNameClusterNameVDPortGroup
      JunkyardScrappyScrappyDoodv-prod
      JunkyardCrappyCrappyDoodv-dev
      JunkyardSnappySnappyDoodv-test
      JunkyardNappyNappyDoodv-kaboom

       

      That's just a sample, there actually a hundred more...…..lol

       

       

      Now, I apparently have an old version of PowerCLI, see below.....

      Every time I try and upgrade, PowerCLI prompts for authentication and I can't have that. Will try and fix later.

       

      Get-Module -Name VMware* -ListAvailable

       

          Directory: C:\Program Files (x86)\VMware\Infrastructure\PowerCLI\Modules

      ModuleType Version    Name                                ExportedCommands
      ---------- -------    ----                                ----------------
      Binary     6.0.0.0    VMware.DeployAutomation
      Binary     6.0.0.0    VMware.ImageBuilder
      Binary     6.5.0.4... VMware.VimAutomation.Cis.Core
      Binary     6.5.0.4... VMware.VimAutomation.Cloud
      Manifest   6.5.0.4... VMware.VimAutomation.Common
      Binary     6.5.0.2... VMware.VimAutomation.Core           HookGetViewAutoCompleter
      Binary     6.0.0.0    VMware.VimAutomation.HA
      Binary     7.0.2.4... VMware.VimAutomation.HorizonView
      Binary     6.5.0.4... VMware.VimAutomation.License
      Binary     6.5.0.4... VMware.VimAutomation.PCloud
      Manifest   6.5.0.4... VMware.VimAutomation.Sdk            Get-PSVersion
      Binary     6.5.0.4... VMware.VimAutomation.Storage
      Binary     6.5.0.4... VMware.VimAutomation.Vds
      Binary     6.5.0.4... VMware.VimAutomation.vROps
      Binary     6.0.0.0    VMware.VumAutomation