To deploy the ARM template you downloaded by using PowerShell, follow the steps below.
-
If you have never used Azure PowerShell, see How to Install and Configure Azure PowerShell and follow the instructions all the way to the end to sign into Azure and select your subscription.
-
If necessary, run the
New-AzureRmResourceGroup
cmdlet to create a new resource group. The command below creates a resource group named TestRG in the Central US azure region. For more information about resource groups, visit Azure Resource Manager Overview.New-AzureRmResourceGroup -Name TestRG -Location centralus
Here is the expected output for the command above:
ResourceGroupName : TestRG Location : centralus ProvisioningState : Succeeded Tags : Permissions : Actions NotActions ======= ========== * ResourceId : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestRG
-
Run the
New-AzureRmResourceGroupDeployment
cmdlet to deploy the new VNet by using the template and parameter files you downloaded and modified above.New-AzureRmResourceGroupDeployment -Name TestVNetDeployment -ResourceGroupName TestRG ` -TemplateFile C:\ARM\azuredeploy.json -TemplateParameterFile C:\ARM\azuredeploy-parameters.json
Here is the expected output for the command above:
DeploymentName : TestVNetDeployment ResourceGroupName : TestRG ProvisioningState : Succeeded Timestamp : 8/14/2015 9:40:00 PM Mode : Incremental TemplateLink : Parameters : Name Type Value =============== ========================= ========== location String Central US vnetName String TestVNet addressPrefix String 192.168.0.0/16 subnet1Prefix String 192.168.1.0/24 subnet1Name String FrontEnd subnet2Prefix String 192.168.2.0/24 subnet2Name String BackEnd Outputs :
-
Run the
Get-AzureRmVirtualNetwork
cmdlet to view the properties of the new VNet, as shown below.Get-AzureRmVirtualNetwork -ResourceGroupName TestRG -Name TestVNet
Here is the expected output for the command above:
Name : TestVNet ResourceGroupName : TestRG Location : centralus Id : /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/TestVNet Etag : W/"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" ProvisioningState : Succeeded Tags : AddressSpace : { "AddressPrefixes": [ "192.168.0.0/16" ] } DhcpOptions : { "DnsServers": null } NetworkInterfaces : null Subnets : [ { "Name": "FrontEnd", "Etag": "W/\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"", "Id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/TestVNet/subnets/FrontEnd", "AddressPrefix": "192.168.1.0/24", "IpConfigurations": [], "NetworkSecurityGroup": null, "RouteTable": null, "ProvisioningState": "Succeeded" }, { "Name": "BackEnd", "Etag": "W/\"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\"", "Id": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/TestRG/providers/Microsoft.Network/virtualNetworks/TestVNet/subnets/BackEnd", "AddressPrefix": "192.168.2.0/24", "IpConfigurations": [], "NetworkSecurityGroup": null, "RouteTable": null, "ProvisioningState": "Succeeded" } ]