4 Replies Latest reply on Nov 14, 2019 5:11 AM by ganapa2000

    Unable to get connect vcenter name

    ganapa2000 Hot Shot



      I am trying to get connect vCenter name from the below script, vcenter name shows blank in the output


      Connect-viserver -Server (Get-Content .\DEMO_VC.txt) > $null

      $VmInfo = Foreach($vc in $global:DefaultVIServers){

      ForEach ($VM in Get-Folder Dev | Get-VM)


      ($VM.Extensiondata.Guest.Disk | Select @{N="Name";E={$VM.Name}},



      @{N="VM PowerState";E={@($VM.PowerState)}},

      @{N="Operating System"; E={@($VM.guest.OSFullName)}},






      Please help..