Skip to content

PowerCLI – One Liner – Finding Duplicate VMkernel IPs

Ever had issues with a host randomly disconnecting? vMotions randomly failing? iSCSI paths dropping? If so, there’s a chance you’re having issues with a duplicate IP on one of your VMkernel ports.

There’s no real way to display such information through the GUI, so I crafted a quick PowerCLI one-liner to accomplish this task:

Get-VMHost -ErrorAction SilentlyContinue | Get-VMHostNetworkAdapter -VMKernel | select VMHost,DeviceName,IP | Group-Object IP | where {$_.Count -gt 1} | %{$_.Group}

An example of what the output will look like if it finds any duplicate IPs:
PowerCLI - Duplicate VMkernel IPs

Note: this was a script that worked in my environment. There is no warranty or support with this script, please use at your own risk.

Published inPowershellVMware

One Comment

  1. Thanks for this PowerCLI command to find duplicate VMkernel IP addresses. Because the original command in this page only appears as an image / screenshot, I’m entering here the command as text as well, to make it indexable by search engines:

    Get-VMHost -ErrorAction SilentlyContinue | Get-VMHostNetworkAdapter -VMKernel | select VMHost, DeviceName, IP | Group-Object IP | where {$_.Count -gt 1} | %{$_.Group}

Leave a Reply