Created
December 2, 2018 04:58
-
-
Save shaikkhajaibrahim/f5678bfb46f4e6dc8a1593f008ed6d86 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$location = "CentralUs" | |
$resgName = "networkfromps" | |
# Create a resource group | |
$networkresg = New-AzureRmResourceGroup -Name $resgName -Location $location | |
# create a network | |
$network = New-AzureRmVirtualNetwork -Name ntier -Location $location -AddressPrefix "10.26.0.0/16" -ResourceGroupName $resgName | |
# creating Web subnet | |
$webSubnet = Add-AzureRmVirtualNetworkSubnetConfig -Name "Web" -AddressPrefix "10.26.0.0/24" -VirtualNetwork $network | |
# Create Business Subnet | |
$businessSubnet = Add-AzureRmVirtualNetworkSubnetConfig -Name "Business" -AddressPrefix "10.26.1.0/24" -VirtualNetwork $network | |
#Submitting changes to Azure | |
Set-AzureRmVirtualNetwork -VirtualNetwork $network | |
# Create Linux VM in Web Subnet | |
# Create Windows Vm in Business Subnet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment