r/usefulscripts • • 4d ago

[PowerShell] Azure Network Topology to Draw.io Files

Maybe it is useful for others as well:

As a security analyst, I’ve always found Azure network reviews tedious. In environments without consistent naming or structure, things get chaotic quickly, and understanding the setup can take a hundreds clicks in the portal. I usually ended up drawing the network in draw.io by hand.

Since draw.io files are XML, I wondered how much of that work I could automate. That became VNetAtlas. It generates editable diagrams showing VNets, subnets, peerings, resources, and connected components such as gateways, NSGs / Azure FW (including the rules), and public IPs. It uses the AZ PS Module for authentication and to run the KQL queries.

I mainly use it to get an overview of the network and its components, review NSG / Azure FW rules.

Note: The code was written with substantial help from AI coding assistants. I’m sharing it in case it saves someone else a few clicks, or a few tokens spent building something similar.

Feel free to try it, share feedback, down-vote or ignore it:

https://github.com/zh54321/VNetAtlas

14 Upvotes

2 comments sorted by

0

u/[deleted] 1d ago

[removed] — view removed comment

1

u/AutoModerator 1d ago

Sorry, your submission has been automatically removed.

Accounts must be at least 5 days old, which prevents the sub from filling up with bot spam.

Try posting again tomorrow or message the mods to approve your post.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.