Posts

Showing posts with the label Azure

Export or Backup Azure Virtual Networks or Subnet information into CSV using PowerShell

 There may be times when you  want to get a report that contains information of all VNETS along with their subnets and address prefixes. You might have question, how to export or backup Azure VNET or subnets information into CSV.  This script will export Azure Virtual Network information along with subnets and address prefixes of all Active subscriptions into a CSV.

Automating a PowerShell Script using Azure Automation Account

So you have have created a PowerShell script to run a job quickly, but now you want to automate that PowerShell Script at a scheduled interval. For this you can use Azure Automation account where you can add you PowerShell script as a runbook and schedule that runbook at a desired time interval. In addition to the script that you have created, you also need to add some additional lines to make Automation account use a connection. Also note that if your script is performing some action (read or write) on any other subscription where the automation account is created, then you'll have to grant Automation Account's Runas account, the access of other subscriptions (You can refer the Microsoft article here. ) So, this is the PowerShell Script that you can use in your Automation Account Runbook.  $connectionName = "AzureRunAsConnection" try {     # Get the connection "AzureRunAsConnection "     $servicePrincipalConnection=Get-AutomationConnection -Name $connection...

Export or Backup Azure Network Security Groups into CSV using PowerShell

There could be many use cases where you may want to export Network Security Groups into CSV. You might have question, how to export or backup Azure Network Security Groups into CSV. Here is the PowerShell script that you can use to export Azure Network Security Groups into CSV using PowerShell script. This script will export Network Security Group along with rules of all Active subscriptions into a CSV.

Export or Backup Azure Route Table into CSV using PowerShell

Image
 There could be many use cases where you may want to export Azure route tables into CSV. Here is the PowerShell script that you can use to export Azure Route Tables into CSV using PowerShell script. This script will export Azure Route Tables along with routes of all Active subscriptions into a CSV.

Azure PowerShell Commands for Listing Network Configuration

While working on Azure, PowerShell can be your friend when you need some information quickly, live and that is not visible in Azure Portal. Following are few of the commands that can be helpful for a network administrator working on Azure. List all virtual network subnets by using PowerShell Get-AzureRmVirtualNetwork -Name <My-vnet-name> -ResourceGroupName <vnet-resource-group-name> | Get-AzureRmVirtualNetworkSubnetConfig | Format-Table List detailed route table of an ExpressRoute circuit. This command output will include prefixes learnt/advertised with Next hop, Local Preference, Weight and AS Path list. Get-AzureRmExpressRouteCircuitRouteTable -ResourceGroupName: <express-route-resource-group-name> -ExpressRouteCircuitName: <express-route-circuit-name> -PeeringType: AzurePrivatePeering -DevicePath: Primary | Format-Table  List summary of BGP neighbor information for a particular routing context. This information is useful to determine for how long a r...

Azure ExpressRoute Physical and Logical Topology

Image
If you are asked to explain physical and logical connectivity of Azure Express Route circuit by looking into the portal, It might be little confusing, if you are not familiar with Azure Portal. So here is the network diagram showing physical and logical connectivity of Express Route setup.  A single express Route Direct circuit has built-in redundancy with two links, that extends from On-Premise with redundant routers to Azure Cloud with redundant Virtual Network Gateways, through redundant routers in Connectivity Partner Location.  ExpressRoute Direct Connectivity diagram Customer compute device (for example, a server or PC) CEs: Customer edge routers PEs (CE facing): Provider edge routers/switches that are facing customer edge routers. Referred to as PE-CEs in this document. PEs (MSEE facing): Provider edge routers/switches that are facing MSEEs. Referred to as PE-MSEEs in this document. MSEEs: Microsoft Enterprise Edge (MSEE) ExpressRoute routers Virtual Network (VNet) Gate...