Using PowerCLI to get the IP address of a VM
Here is a simple but handy PowerCLI one liner which can output the VM name and it’s IP address. Connect-VIServer localhost Get-VM | Select Name, @{N=”IP Address”;E={@($_.guest.IPAddress[0])}} Name IP Address—- ———-ABWEB1v 172.16.100.1ABWEB2v 172.16.100.2ABWEB3v 172.16.100.3ABWEB4v 172.16.100.4ABWEB5v 172.16.100.5ABWEB6v 172.16.100.6ABWEB7v 172.16.100.7ABWEB8v 172.16.100.8ABWEB9v 172.16.100.9ABWEB10v 172.16.100.10ABWEB11v 172.16.100.11ABAPP1v 172.16.101.20ABDOM1v 172.16.102.20 Getting a little more complicated here we are getting all the VMs […]
Continue Reading