With Hyper-V, is there any way to locate a virtual machine knowing only the MAC Address and an IP address it's using? I have access to SCVMM and Failover Cluster Manager but the option to search by MAC doesn't appear to be listed.
Thanks.
If the guest is a Windows machine you can open a command prompt on your PC and use nbtstat to get the machine name.
nbtstat -a 192.168.0.2
Try the following VBscript. It is not for finding a virtual machine but for finding the serial number of a system. Since a vitual machine is not having a serial number the code will help you in identifying whether a system is real or virtual using the IP. Here is how it works Just enter the IP or host ID of the the system in the dialogbox; if the computer is real it will return you a serial number else some dashes( ------).
strComputer = Inputbox("Enter Computer name:")
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSMBIOS = objWMIService.ExecQuery ("Select * from Win32_SystemEnclosure")
For Each objSMBIOS in colSMBIOS
Wscript.Echo "Serial Number: " & objSMBIOS.SerialNumber
'Wscript.Echo "Serial Number: " & objSMBIOS.Product
Next
It is working for me hope it works for you too
I'm going to upvote both answers here and mark my own answer as accepted. I didn't get chance to check @user69867's answer but I think that the following link will be useful for anyone else trying to do this.