<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Azure on mattdrew.net - Matt&#39;s network blog</title>
		<link>https://mattdrew.net/tags/azure/</link>
		<description>Recent content in Azure on mattdrew.net - Matt&#39;s network blog</description>
		<generator>Hugo</generator>
		<language>en-US</language>
		
		
		
		
			<lastBuildDate>Wed, 23 Sep 2026 02:55:37 +0000</lastBuildDate>
		
			<atom:link href="https://mattdrew.net/tags/azure/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Exporting Azure NSG to Excel .CSV</title>
				<link>https://mattdrew.net/posts/nsg-to-csv/</link>
				<pubDate>Wed, 23 Sep 2026 02:55:37 +0000</pubDate>
				<guid>https://mattdrew.net/posts/nsg-to-csv/</guid>
				<description>&lt;p&gt;I have recently been studying Azure networking and came across a need to have my NSGs in Excel CSV format. This is how I did it.&lt;/p&gt;&#xA;&lt;p&gt;Pull up Azure cloud shell. You may first need to specify the subscription.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Set-AzContext -SubscriptionName &amp;#34;&amp;lt;Subscriptionname&amp;gt;&amp;#34;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Of course, replace RGname, NSGname and filename with your own values.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$nsg = Get-AzNetworkSecurityGroup `&#xA;-ResourceGroupName &amp;#34;&amp;lt;RGname&amp;gt;&amp;#34; `&#xA;-Name &amp;#34;&amp;lt;NSGname&amp;gt;&amp;#34;&#xA;$nsg.SecurityRules |&#xA;Select-Object `&#xA;Name,&#xA;Priority,&#xA;Direction,&#xA;Access,&#xA;Protocol,&#xA;@{N=&amp;#39;SourceAddress&amp;#39;;E={$_.SourceAddressPrefix -join &amp;#34;,&amp;#34;}},&#xA;@{N=&amp;#39;SourcePort&amp;#39;;E={$_.SourcePortRange -join &amp;#34;,&amp;#34;}},&#xA;@{N=&amp;#39;DestinationAddress&amp;#39;;E={$_.DestinationAddressPrefix -join &amp;#34;,&amp;#34;}},&#xA;@{N=&amp;#39;DestinationPort&amp;#39;;E={$_.DestinationPortRange -join &amp;#34;,&amp;#34;}} |&#xA;Export-Csv &amp;#34;&amp;lt;filename&amp;gt;.csv&amp;#34; -NoTypeInformation&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Then manage files &amp;gt; Download &amp;gt; enter your filename from the script&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
