PowerShell ile Azure'da Virtual Network olusturma

Опубликовано: 30 Январь 2025
на канале: Emre Ozan Memis
526
15

New-AzResourceGroup -Name AzureRG -Location westus

$gatewaysubnet = New-AzVirtualNetworkSubnetConfig -Name PSGatewaySubnet -AddressPrefix "10.172.100.0/27"
$virtualNetwork = New-AzVirtualNetwork -Name PSAzureBCVnet -ResourceGroupName AzureRG -Location westus -AddressPrefix "10.172.100.0/24" -Subnet $gatewaysubnet
Add-AzVirtualNetworkSubnetConfig -Name AzureFirewallSubnet -VirtualNetwork $virtualNetwork -AddressPrefix "10.172.100.32/27"
Add-AzVirtualNetworkSubnetConfig -Name AzureBastionSubnet -VirtualNetwork $virtualNetwork -AddressPrefix "10.172.100.64/27"
Add-AzVirtualNetworkSubnetConfig -Name PSDMZSubnet -VirtualNetwork $virtualNetwork -AddressPrefix "10.172.100.96/27"
$virtualNetwork | Set-AzVirtualNetwork