Saturday, March 5, 2016

VMware PowerCLI get vm details from MAC address

$report =@()
Get-VM -name tech-jockey* | Get-View | %{
 $VMname = $_.Name
 $_.guest.net | where {$_.MacAddress -eq "00:88:56:ca:77:78"} | %{
        $row = "" | Select VM, MAC
        $row.VM = $VMname
        $row.MAC = $_.MacAddress
        $report += $row
  }
  }
$report

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...