Automation

 View Only
  • 1.  Get-VMHostNetworkAdapter and cluster

    Posted Sep 06, 2012 06:39 PM

    hello

    i know for to have the vmk, ip, and vmhost

    this commad is ok

    Get-VMHostNetworkAdapter | select VMhost, Name, IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec | Export-Csv C:\VMHostNetworkDetails.csv

    but, i would have the name of the cluster

    can you help me

    thank you



  • 2.  RE: Get-VMHostNetworkAdapter and cluster

    Posted Sep 06, 2012 07:03 PM

    You can use a calculated property

    Get-VMHostNetworkAdapter | 
    Select VMhost, 
    @{N="Cluster";E={Get-CLuster -VMHost $_.VMHost | Select -ExpandProperty Name}}, 
    Name
    , IP, SubnetMask, Mac, PortGroupName, vMotionEnabled, mtu, FullDuplex, BitRatePerSec |
    Export-Csv
    C:\VMHostNetworkDetails.csv


  • 3.  RE: Get-VMHostNetworkAdapter and cluster

    Posted Sep 07, 2012 08:50 AM

    Hi

    thank you for your help

    it's exactely what i have expected.

    thanks