Skip to content

Latest commit

 

History

History
70 lines (52 loc) · 4.56 KB

create-vmss-powershell.md

File metadata and controls

70 lines (52 loc) · 4.56 KB
title description services documentationcenter author tags ms.service ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author ms.custom
Azure PowerShell Script Sample - Manage web traffic | Microsoft Docs
Azure PowerShell Script Sample - Manage web traffic with an application gateway and a virtual machine scale set.
application-gateway
networking
greg-lindsay
azure-resource-manager
application-gateway
sample
vm-windows
infrastructure
01/29/2018
greglin
mvc, devx-track-azurepowershell

Manage web traffic with Azure PowerShell

This script creates an application gateway that uses a virtual machine scale set for backend servers. The application gateway can then be configured to manage web traffic. After running the script, you can test the application gateway using its public IP address.

[!INCLUDE sample-powershell-install]

[!INCLUDE quickstarts-free-trial-note]

Sample script

[!code-powershellmain]

Clean up deployment

Run the following command to remove the resource group, application gateway, and all related resources.

Remove-AzResourceGroup -Name myResourceGroupAG

Script explanation

This script uses the following commands to create the deployment. Each item in the table links to command specific documentation.

Command Notes
New-AzResourceGroup Creates a resource group in which all resources are stored.
New-AzVirtualNetworkSubnetConfig Creates the subnet configuration.
New-AzVirtualNetwork Creates the virtual network using with the subnet configurations.
New-AzPublicIpAddress Creates the public IP address for the application gateway.
New-AzApplicationGatewayIPConfiguration Creates the configuration that associates a subnet with the application gateway.
New-AzApplicationGatewayFrontendIPConfig Creates the configuration that assigns a public IP address to the application gateway.
New-AzApplicationGatewayFrontendPort Assigns a port to be used to access the application gateway.
New-AzApplicationGatewayBackendAddressPool Creates a backend pool for an application gateway.
New-AzApplicationGatewayBackendHttpSettings Configures settings for a backend pool.
New-AzApplicationGatewayHttpListener Creates a listener.
New-AzApplicationGatewayRequestRoutingRule Creates a routing rule.
New-AzApplicationGatewaySku Specify the tier and capacity for an application gateway.
New-AzApplicationGateway Create an application gateway.
Set-AzVmssStorageProfile Create a storage profile for the scale set.
Set-AzVmssOsProfile Define the operating system for the scale set.
Add-AzVmssNetworkInterfaceConfiguration Define the network interface for the scale set.
New-AzVmss Create a virtual machine scale set.
Get-AzPublicIPAddress Gets the public IP address of an application gateway.
Remove-AzResourceGroup Removes a resource group and all resources contained within.

Next steps

For more information on the Azure PowerShell module, see Azure PowerShell documentation.

Additional application gateway PowerShell script samples can be found in the Azure Application Gateway documentation.