Automating with PowerShell: Unifi PowerShell module and creating network maps

So this blog is a two for one as I’m on vacation right now and enjoying some time off. First I’d like to tell you about a new module I’ve created and am starting to work on some more. Last week I’ve had a small thread on twitter with a friend that said something like “I’d love a tool that creates a network map for me” and I figured that would be a pretty cool tool too.

Network mapping with PowerShell

After some figuring out it seems that allows you to import data as a CSV. I’ve created a PowerShell module that scans your entire network and creates a cool overview using the standard CSV. This makes it easy to perform a quick scan and see all devices immediately. It currently does some “Guess-smart” matching on what the device type is, but I’m expanding the module rapidly.

To find this project, check out the github page here. Using it is dead simple, the following creates a network map file in C:\Temp

install-module PsdrawIO
New-Networkmap -Network -Layout organic | out-file "C:\Temp\Example.csv"

Which looks like this as the end result;


Unifi PowerShell module

Next up is a module that is not mine. A friend of mine asked me for some help in creating his first module and I was glad to help him because it’s a pretty awesome project. The Unifi PowerShell module allows you to connect to any Unifi Controller and extract data easily. This could make monitoring and documenting Unifi infrastructure a whole lot simpler.

If you wanna check out that module, check the github page here. Michael has done an amazing job on this.

And that’s it! as always, Happy Powershelling


  1. Steve G July 27, 2021 at 4:11 pm

    Is it possible to scan two networks?
    ie. New-Networkmap -Network, -Layout organic | out-file “C:\Temp\Example.csv”

    So that I can get the subnets on a client network also? The ‘scan all connected networks’ option does not work, or not working right for me?

  2. Jessie Leighty October 29, 2021 at 1:50 am

    I have been trying to deploy this for weeks now and I am completely confused on how to use this script. I finally got the module installed and imported but how do I import the CSV results into a map? the instructions are vague at best here… please help, I’m really struggling… 🙁

    1. Jeff February 13, 2022 at 4:02 am

      Hi Jessie,

      On you have to click on Arrange > Insert > Advanced > CSV, there you can paste in the csv.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.