Hi all, the below vbscript (save as sample.vbs and execute using "cscript.exe sample.vbs"), will give you a list of all VMs in a hyper-v system as well as their respective BIOS GUIDs. This can help in troubleshooting VMM 2008 beta for the cases where more than 1 VM on the same hyper-v host is having the same BIOS ID.
Option Explicit Dim WMIServiceDim KvpComponents Dim VMListDim VMSettingListDim VM Dim itemDim settingDim component
'Get instance of 'virtualization' WMI service on the local computerSet WMIService = GetObject("winmgmts:\\.\root\virtualization") 'Get all the MSVM_ComputerSystem objectSet VMList = WMIService.ExecQuery("SELECT * FROM Msvm_ComputerSystem") For Each VM In VMList if VM.Caption = "Virtual Machine" then WScript.Echo "========================================" WScript.Echo "VM Name: " & VM.ElementName WScript.Echo "VM GUID: " & VM.Name WScript.Echo "VM State: " & VM.EnabledState
' Now get the BIOS GUID for this VM Set VMSettingList = WMIService.ExecQuery("SELECT * FROM Msvm_VirtualSystemSettingData") For Each setting In VMSettingList Dim tempVMname tempVMName = "Microsoft:" + VM.Name if setting.InstanceID = tempVMName then WScript.Echo "VM BIOS GUID: " & setting.BIOSGUID end if Next end ifNext