Map your VI using Netmap

At the UK Powershell user group James used Netmap, I was intrigued with this and what it could do, with a few lines to integrate this into the VI toolkit I managed to get a nice map of which VM’s were on each host.

Download Netmap here and try it for yourself….

Connect-VIServer yourserver
$vmhs = Get-VM

$myCol = @()
ForEach ($vmh in $vmhs)
{
$myobj = “” | select-Object source, target
$myobj.source = $vmh.host
$myobj.target = $vmh.Name
$myCol += $myobj
}

$mycol | Export-Csv .\Temp.csv
Import-Csv .\Temp.csv | show-netmap

Im also working on a Visio script which will produce a much more pleasing to the eye report…Watch this space and let me know if you would like to test it for me in its early phases.

8 thoughts on “Map your VI using Netmap”

  1. Alan recent versions of the nmap package under windows comes with zenmap.exe as a visual viewer. Was there an earlier “show-netmap” binary in nmap? Simply passing the csv to zenmap instead of show-netmap does not work. Any ideas?

  2. You will need to download the netmap stuff from the link in the post and add my code to it. Drop me a mail and I will send you the Visio stuff when its ready, would also be interested to see the results of a global installation.

  3. I would also be intersted in testing your Visio script. We have a very large global vmware installation and would be intersted in the results.

  4. why do I get the error – “The term ‘show-netmap’ is not recognized as a cmdlet, funtion, operable program, or script file.” What do i need to load in PS to get that cmdlet?

Leave a Reply