Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
New-AzPublicIpPrefix
- Module:
- Az.Network Module
Creates a Public IP Prefix
Syntax
Default (Default)
New-AzPublicIpPrefix
-Name <String>
-ResourceGroupName <String>
-Location <String>
[-Sku <String>]
[-Tier <String>]
-PrefixLength <UInt16>
[-IpAddressVersion <String>]
[-IpTag <PSPublicIpPrefixTag[]>]
[-Zone <String[]>]
[-CustomIpPrefix <PSCustomIpPrefix>]
[-EdgeZone <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzPublicIpPrefix cmdlet creates a public IP prefix.
Examples
Example 1: Create a new public Ip prefix
$publicIpPrefix = New-AzPublicIpPrefix -Name $prefixName -ResourceGroupName $rgName -PrefixLength 30
This command creates a new public IP prefix resource.
Example 2: Create a new global public Ip prefix
$publicIpPrefix = New-AzPublicIpPrefix -ResourceGroupName $rgname -name $rname -location $location -Tier Global -PrefixLength 30
This command creates a new global public IP prefix resource.
Example 3
Creates a Public IP Prefix. (autogenerated)
New-AzPublicIpPrefix -CustomIpPrefix <PSCustomIpPrefix> -Location 'West US' -Name 'MyPublicIPPrefix' -PrefixLength '31' -ResourceGroupName 'MyResourceGroup'
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-CustomIpPrefix
The CustomIpPrefix that this PublicIpPrefix will be associated with
Parameter properties
| Type: | PSCustomIpPrefix |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
| Type: | IAzureContextContainer |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | AzContext, AzureRmContext, AzureCredential |
Parameter sets
-EdgeZone
The edge zone of the public IP prefix
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Force
Do not ask for confirmation if you want to overwrite a resource
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IpAddressVersion
The public IP address version.
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | IPv4, IPv6 |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-IpTag
IpTag List.
Parameter properties
| Type: | |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Location
The public IP prefix location.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
The resource name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | ResourceName |
Parameter sets
-PrefixLength
The PublicIPPrefix length
Parameter properties
| Type: | UInt16 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ResourceGroupName
The resource group name.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Sku
The public IP Prefix Sku name.
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | Standard, StandardV2 |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Tag
A hashtable which represents resource tags.
Parameter properties
| Type: | Hashtable |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Tier
The public IP Prefix Sku tier.
Parameter properties
| Type: | String |
| Default value: | None |
| Accepted values: | Regional, Global |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
-Zone
A list of availability zones denoting the IP allocated for the resource needs to come from.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Inputs
String
UInt16
PSPublicIpPrefixTag
String
Hashtable
Outputs
PSPublicIpPrefix
Related Links
Azure PowerShell
Feedback
Was this page helpful?
