Add more Vnet settings in my csv powershell script?

DeHaven Graham 101 Reputation points
2021-06-19T21:51:35.26+00:00

Hi,

Below is my pre-existing script which pulls subnet and address space but how would I go about adding more settings to my script from my Azure Vnet settings?

$vnets =Get-AzVirtualNetwork|
Select-Object SubscriptionName,ResourceGroupName,Name, @{
label='AddressSpace'
expression={$.AddressSpace.AddressPrefix}}, @{
label='SubnetName'
expression={$
.Subnets.Name}
}, @{
label='SubnetAddressSpace'
expression={$_.Subnets.AddressPrefix}
}

$vnets | convertto-csv

107188-image.png

Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,139 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andreas Baumgarten 96,266 Reputation points MVP
    2021-06-19T23:12:51.937+00:00

    Hi @DeHaven Graham ,

    these threads are the same question?
    https://learn.microsoft.com/en-us/answers/questions/441087/export-azure-vnet-confguration-settings-to-a-csv-f.html

    It doesn't make much sense to post the question more than once.

    You will find my answer in the linked thread.

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments