Automation

 View Only
  • 1.  PowerCLI: Network Adapter Information

    Posted Sep 18, 2017 09:54 PM

    Hello All

    I am running a script to extract VM Information including vCPU, Memory, OS, Disks, Partition Size, RDM, IP Address, vCenter, VMX, VMDK etc. For PortGroup name, I am using below method

    $vm = Get-VM myvm1.domain.com

    $vm | Get-NetworkAdapter | Select -ExpandProperty NetworkName

    which is increasing my script output time for an vCenter Server managing 2000+ VMs. I could extract everything else with Get-VM and would like to find out if there any option/way to find out PortGroup name with Get-VM too.

    Please suggest.



  • 2.  RE: PowerCLI: Network Adapter Information
    Best Answer

    Posted Sep 18, 2017 10:46 PM

    (get-view $vm.extensiondata.network).name

    would probably produce the quickest results.



  • 3.  RE: PowerCLI: Network Adapter Information

    Posted Sep 19, 2017 10:09 AM

    Thanks. Let me try today and update.