Microsoft Research .NetMap and PowerShell

August 31, 2008

in NetMap,PowerShell

Microsoft Research released .NetMap. A free Open Source tool for creating and viewing network graphs. Included is a set of .Net libraries to add network graphs to custom applications.

Out of the box the tool supports some great features. One feature is the support for automatic layout of the vertices like Circular, Grid and Sinusoid Horizontal to name a few.

Interactive features I like are the ability to drag the resulting nodes around on the drawing surface and clicking on a node to highlight the edges in and out of the node.

Excel Integration

A unique feature is the VSTO component for Excel. In a spreadsheet you can specify Vertex 1 and Vertex 2. The associated task pane lets you read the spreadsheet and layout the graph with different options.

image

PowerShell Integration

I worked up a few PowerShell scripts so I could produce graphs from different sources by:

  1. Importing a comma separated values file
  2. Importing an Excel Spreadsheet
  3. Running commands against the system

Here’s are the commands and their results. The csv file and excel file contain the same vertex information for the graph.

Contents of test.csv

source,target
a,b
a,c
c,a
d,a
e,h
f,i
g,j
a,f

Import-Csv test.csv | Show-NetMap

image

image Same graph as above. Clicking on node “a” highlights all in and out edges.

 

 

 

 

 

 

.\Import-ExcelSheet -File test -SheetName Test | Show-NetMap

image

 

.\Graph-Object (Get-Process powershell, moe*)

 image

 

.\Graph-Object (Get-Service net*p*)

image

Notes

Download Here

{ 0 comments… add one now }

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Contrat Creative Commons

© 2007-2013, Doug Finke