Need to work out the IP address and MAC addresses of your Hyper-V VMs in SCVMM?
If you have been trying to get information out of VMM using the ‘traditional’ Get-VM commandlet you may have noticed it throws an error similar to this:
get-vm : The cmdlet cannot find a specified class. Verify that the relevant feature is enabled on the operating system.
Now this threw me off as being an incorrect command. What I found is that you need to specify the VMM server name.
If you just want a list of all the VMs, you can run the following:
get-vm -VMMServer your.vmmserver.domain
I also noticed that if you run get-vm by itself in the PowerShell (don’t forget to run Import-Module -Name “virtualmachinemanager”) it does not need the -VMMServer to be specified.
Anyhoo – once you have the command to spit out all the VMs in your environment, its a simple pipe to select the information you need:
get-vm -VMMServer your.vmmserver.domain | Get-VirtualNetworkAdapter | select name,ipv4address,MACAddress | Format-Table
Your output should look something like this:
Hi Chris, Your blog was helpful but I’m still a bit confused. Do we need both the certificate of no…
Hi Daniel, Sorry - I'm not too sure, its possible the certificate of no impediment has changed since I filled…
Hi Aaron, In Japan you should be good to go. You might have difficulty in other countries when trying to…
Hello Chris I have recently married in Japan Konintodoke was filled out and accepted translator advised we were know married…
Hi, Chris. I'm just trying to get my cert of no impediment to marriage done now and I'm a bit…