Hello @DeHaven Graham
Here is a code:
Import-Csv .\subnets.csv | ForEach-Object {
$appssubnet = New-AzVirtualNetworkSubnetConfig -Name servers -AddressPrefix $_.appssubnet -NetworkSecurityGroupId "/subscriptions/xxxxxxxxxx-xxxx-xxxx-xxxxx-
xxxxxxxxxxxx/resourceGroups/powershell-grp/providers/Microsoft.Network/networkSecurityGroups/app-nsg1"`
-RouteTableId "/subscriptions/xxxxxxxxxx-xxxx-xxxx-xxxxx-xxxxxxxxxxxx/resourceGroups/powershell-grp/providers/Microsoft.Network/routeTables/powershell-rt"
$serversubnet = New-AzVirtualNetworkSubnetConfig -Name apps -AddressPrefix $_.serversubnet -RouteTableId "/subscriptions/xxxxxxxxxx-xxxx-xxxx-xxxxx-
xxxxxxxxxxxx/resourceGroups/powershell-grp/providers/Microsoft.Network/routeTables/powershell-rt"
$dmz = New-AzVirtualNetworkSubnetConfig -Name dmz -AddressPrefix $_.dmz
$updatedvnet = New-AzVirtualNetwork -Name "testsubnet" -ResourceGroupName "powershell-grp" -Location "North Europe" -AddressPrefix $_.addressprefix -Subnet $serversubnet, $dmz,
$appssubnet -Force:$true
$updatedvnet | Set-AzVirtualNetwork
}
CSV: