Getting the Service Console IP addresses of your ESX servers with vSphere PowerCLI (formerly known as the VI Toolkit for Powershell):

Get-VMHost | Select Name, @{N="ConsoleIP";E={(Get-VMHostNetwork).ConsoleNic | ForEach{$_.IP}}}
Tagged with:
 

4 Responses to Oneliner: Service Console IP with PowerCLI

  1. Tim Cutting says:

    Correction: You are missing the $_ after …Network
    This Works:

    Get-VMHost | Select Name, @{N=”ConsoleIP”;E={(Get-VMHostNetwork $_).ConsoleNic | ForEach{$_.IP}}}

  2. NiTRo says:

    VirtualNic not ConsoleNic for me

  3. Mohan says:

    Hi All,

    I am born baby in Powershell scripting. Can any one give me a script to read all the VM`s configuration like (Mem,CPU,DISK, DISK Usage, Disk file Path and Current ESX that the VM powered on etc.) for all the VM`s in a datacenter.

    Thanks

Leave a Reply