Hi All,
Can anyone here please help me to modify the script below so that I can get the IP address for all vmk1 and vmk2 highlighted:
Get-VMHostNetworkAdapter -VMKernel -VMHost (get-cluster |get-vmhost) | ? {$_.PortgroupName -eq "vMotion_1" -and $_.PortgroupName -eq "vMotion_2"} | select Name,VMhost,Mac,IP,Mtu,SubnetMask | Export-Csv -Path C:\temp\HPBlades-VMotionInterfaceIPaddresss.csv
because the script above does not return anything and no error is mentioned, just blank .CSV result.
Thanks in advance.
You can use the following PowerCLI command to retrieve the vMotion IP addresses of all of your ESXi hosts:
Get-VMHost | Get-VMHostNetworkAdapter -VMKernel |
Where-Object {$_.vMotionEnabled} |
select Name,VMhost,Mac,IP,Mtu,SubnetMask
You can use the following PowerCLI command to retrieve the vMotion IP addresses of all of your ESXi hosts:
Get-VMHost | Get-VMHostNetworkAdapter -VMKernel |
Where-Object {$_.vMotionEnabled} |
select Name,VMhost,Mac,IP,Mtu,SubnetMask
Thanks Rob,
It works great 🙂