Hi expert,
Just wondering, whats the command to get the list of vm with ip address..i been searching but cant get the answer
hope you guys can help me
thanks
To get a list of virtual machines and the corresponding IP addresses you can do:
Get-VM | Select-Object -Property Name,@{N="IPAddress";E={$_.Guest.IPAddress}}
Regards, Robert
To get a list of virtual machines and the corresponding IP addresses you can do:
Get-VM | Select-Object -Property Name,@{N="IPAddress";E={$_.Guest.IPAddress}}
Regards, Robert
thank you soo much robert
If you want this to also work for guests that have more than 1 IP address, you should do
Get-VM | Select-Object -Property Name,@{N="IPAddress";E={[string]::Join(',',$_.Guest.IPAddress)}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference