Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 29128

Listing all the IP Addresses used by VMs

$
0
0

Here is a neat little snippet of PowerShell:

Get-VM | ?{$_.State -eq "Running"} |  Get-VMNetworkAdapter | Select VMName, IPAddresses

If you run this on a Hyper-V Server it will give you a listing of all the IP addresses that are assigned to running virtual machines:

image

This works whether you are using DHCP or Static IP addresses – and can really help when you are trying to track down a rogue virtual machine.

Cheers,
Ben


Viewing all articles
Browse latest Browse all 29128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>