Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Here is a handy PowerShell snippet:
Get-VM | ?{$_.ReplicationMode -ne "Replica"} | Select -ExpandProperty NetworkAdapters | Select VMName, IPAddresses, Status
Which delivers an output like this:
As you can see, it lists the IP addresses of all the virtual machines running under Hyper-V. A couple of notes to make about this:
Hopefully you will find this useful in your environments.
Cheers,
Ben
Anonymous
May 23, 2015
But how to get VM IP addresses with VMM 2012 SP1?
Anonymous
May 26, 2015
Ben, I have been using Windows since Windows 3.11 (now I am using Windows 7) but still have no idea what is PowerShell and why should I prefer it to BAT-files (they look simpler to me). So can you recommend me one or two book about PowerShell. And also I want to know is it a replacement of BAT-files or just an addition? I mean how long BAT-files will be supported?
Anonymous
June 21, 2015
Is there a way to make this work with non-Windows VMs?
Dan
Anonymous
August 17, 2016
I am using powershell version 2.0 on windows server 2008R2. I am trying to use the command Get-VM but it gives me error. My final conclusion is that 2.0 version does not support this command. Am I right? If so, then what is the solution? I want to know the IP addresses used by my virtual machines.
Anonymous
September 01, 2016
I'm looking for a way to get the VM subnet mask along with the IP address. Does anyone know if there is a way?Thanks a lot!
Anonymous
February 14, 2017
hi how can i get ip of all hyper v machine and there sub a/c ip meaning 1 hyper v machine and there sub a/c
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in