Member-only story

Extract Azure Network (Vnet, Subnet, NSG, Nsg-Rules) Information for Audit & Sanity checks

Vijay Borkar (VBCloudboy)
3 min readMay 28, 2021

using PowerShell script

https://unsplash.com/photos/zZfuH4lINlk?utm_source=unsplash&utm_medium=referral&utm_content=creditShareLink

When we start working on a project and build Infrastructure manually or by any automation tool, In the end there’s always an Audit and Sanity checks which is required to perform. Like Audit Checks are required to validate all the infrastructure pieces are in place as defined in the proposed design document and Sanity Checks are required to trace day-to-day activities performed on the infrastructure to find deviation and report it to the system whether the deviation was approved/unapproved changes.

Based on the similar grounds, I have came out with a PowerShell Script which addresses these 2 areas (Audit & Sanity) and helps us with an extracted information in an CSV format which can be tallied with the source information.

NOTE: The PowerShell(PS) script extracts and populate information on Azure Network emphasizing on virtual network, network security group, subnets and peering.

Let me give you a quick overview on the PS-script. The PS-script is segregated in 3 sections; declaring variables, defining functions & main-section.

(1) First is declaring variables, where you have to input few details which will be used later by other elements in the script for reference…

--

--

Vijay Borkar (VBCloudboy)
Vijay Borkar (VBCloudboy)

Written by Vijay Borkar (VBCloudboy)

Assisting Microsoft partners in elevating their technical capabilities in AI, Analytics, and Cybersecurity.

Responses (1)