My notes and ramblings, normally about automation

PowerCLI – One Liner – Finding Duplicate VMkernel IPs

· Read in about 1 min · (113 Words)
PowerCLI PowerShell VMware

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.