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:

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:

Your output should look something like this:

VMMVMsIPSimple as that!