VMware: Easy menu to find VM network adapter by MAC address
Last week I need to locate some traffic from physical switches to my virtual environment.. I need to find out which MAC address belong to which virtual machine (+ adapter).. time to script this include menu
#====================================================================#
# SCRIPT: Find_VM_by_MAC_address_menu.ps1 #
# FUNCTION: Find VM (+ adapter) by MAC address with easy menu #
# OWNER: Sander Daems #
# CREATED: 11/01/2011 #
# MODIFIED: 11/01/2011 #
# VERSION: v.1.0 #
#====================================================================#
# CHANGELOG: #
# #
# v.1.0 #
# - Created script; #
# #
#====================================================================#
# HOST - CUSTOM DEFINITIONS #
#====================================================================#
Write-Host "Let's find that damn address" -foregroundcolor green
#====================================================================#
$cluster = read-host "Select Cluster name"
$macaddress = read-host "Select MAC Address to find"
#====================================================================#
# Script #
#====================================================================#
Get-Cluster $cluster | Get-VM | Get-NetworkAdapter | Where-Object {$_.MacAddress -eq "$macaddress"} | Format-List -Property *
#====================================================================#







Sweet write, very thank you for writing this script
Great! Thanks for sharing!
Very handy script, thanks Sander
Does this also work to find ip-addressess?
Nice, used this script today.. works like a charm