New-AzPublicIpPrefix

Creates a Public IP Prefix

Syntax

New-AzPublicIpPrefix
   -Name <String>
   -ResourceGroupName <String>
   [-Location <String>]
   [-Sku <String>]
   -PrefixLength <UInt16>
   [-IpAddressVersion <String>]
   [-IpTag <PSPublicIpPrefixTag[]>]
   [-Zone <String[]>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzPublicIpPrefix cmdlet creates a public IP prefix.

Examples

1: Create a new public Ip prefix

PS C:\> $publicIpPrefix = New-AzPublicIpPrefix -Name $prefixName -ResourceGroupName $rgName -PrefixLength 30

This command creates a new public IP prefix resource.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.Core.IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IpAddressVersion

The public IP address version.

Type:String
Accepted values:IPv4, IPv6
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-IpTag

IpTag List.

Type:Microsoft.Azure.Commands.Network.Models.PSPublicIpPrefixTag[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Location

The public IP prefix location.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Name

The resource name.

Type:String
Aliases:ResourceName
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-PrefixLength

The PublicIPPrefix length

Type:UInt16
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

The resource group name.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Sku

The public IP Prefix Sku name.

Type:String
Accepted values:Standard
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Zone

A list of availability zones denoting the IP allocated for the resource needs to come from.

Type:System.String[]
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Inputs

String

UInt16

Microsoft.Azure.Commands.Network.Models.PSPublicIpPrefixTag[]

System.String[]

Hashtable

Outputs

Microsoft.Azure.Commands.Network.Models.PSPublicIpPrefix