Skip to content

Latest commit

 

History

History
81 lines (59 loc) · 3.74 KB

create-public-ip-availability-zone-powershell.md

File metadata and controls

81 lines (59 loc) · 3.74 KB

title: Create a zoned Public IP address with PowerShell | Microsoft Docs description: Create a public IP in an availability zone with PowerShell. services: virtual-network documentationcenter: virtual-network author: jimdial manager: jeconnoc editor: tags:

ms.assetid: ms.service: virtual-network ms.devlang: na ms.topic: article ms.tgt_pltfrm: ms.workload: infrastructure ms.date: 09/25/2017 ms.author: jdial ms.custom:

Create a public IP address in an availability zone with PowerShell

You can deploy a public IP address in an Azure availability zone (preview). An availability zone is a physically separate zone in an Azure region. Learn how to:

  • Create a public IP address in an availability zone
  • Identify related resources created in the availability zone

If you don't have an Azure subscription, create a free account before you begin.

This article requires that you have version 4.4.0 or higher of the AzureRM module installed. To find the version, run Get-Module -ListAvailable AzureRM. If you need to install or upgrade, install the latest version of the AzureRM module from the PowerShell Gallery.

Note

Availability zones are in preview and are ready for your development and test scenarios. Support is available for select Azure resources and regions, and VM size families. For more information on how to get started, and which Azure resources, regions, and VM size families you can try availability zones with, see Overview of Availability Zones. For support, you can reach out on StackOverflow or open an Azure support ticket.

Log in to Azure

Log in to your Azure subscription with the Login-AzureRmAccount command and follow the on-screen directions.

Login-AzureRmAccount

Create resource group

Create an Azure resource group with New-AzureRmResourceGroup. A resource group is a logical container into which Azure resources are deployed and managed. In this example, a resource group named myResourceGroup is created in the westeurope region. westeurope is one of the Azure regions that supports availability zones in preview.

New-AzureRmResourceGroup -Name AzTest -Location westeurope

Create a zonal public IP address

Create a public IP address in an availability zone using the following command:

    New-AzureRmPublicIpAddress `
        -ResourceGroupName myResourceGroup `
        -Name myPublicIp `
        -Location westeurope `
        -AllocationMethod Static `
        -Zone 2

Note

When you assign a standard SKU public IP address to a virtual machine’s network interface, you must explicitly allow the intended traffic with a network security group. Communication with the resource fails until you create and associate a network security group and explicitly allow the desired traffic.

Get zone information about a public IP address

Get the zone information of a public IP address using the following command:

Get-AzureRmPublicIpAddress ` 
    -ResourceGroup myResourceGroup `
    -Name myPublicIp

Next steps