Documentation – ESXi Host vMotion IPs

I’ve recently had to audit and document several vSphere environments.  Multiple hosts had been configured manually and there were some mistakes in the IP settings.  I put together this POWERCLI function to report back on these settings and will now use it for documentation moving forward.  Hopefully of some use to others too.

Connect to a host or vCenter and give it a go.


function Get-HostvMotionIP {
Param (

[string]$ESX = '*'


The Get-HostvMotionIP retrieves CW Document Information regarding iSCSI IP Addresses of ESXi hosts
Get-HostvMotionIP -ESX "",""
$vMotionIPinfo = Get-HostvMotionIP | out-gridview -title vMotion IPs
Chris Tucker 

$myesxihosts = Get-VMHost $ESX
## vMotion

$vMotionAudit = @()

foreach ($VMHost in $myesxihosts) {

$vmnics = (Get-VMHostNetwork -VMHost $ | where {$_.VMotionEnabled -eq $true} | Sort-Object -Property Name 

foreach ($vmnic in $vmnics) {
$vMotionDetails = New-Object PSObject
$vMotionDetails | Add-Member -name "Hostname" -Value $ -MemberType NoteProperty
$vMotionDetails | Add-Member -name "vMOTION IP Address" -Value $vmnic.IP -MemberType NoteProperty
$vMotionDetails | Add-Member -name "VLAN" -Value (Get-VirtualPortGroup -VMHost $ -Name $vmnic.PortGroupName).VLANID -MemberType NoteProperty
$vMotionDetails | Add-Member -name "Subnet Mask" -Value $vmnic.SubnetMask -MemberType NoteProperty

$vMotionAudit += $vMotionDetails


Write-Output $vMotionAudit


You may also like...

Leave a Reply

Your email address will not be published.