< Back
New-AzureRmPublicIpAddress
Post
NAME New-AzureRmPublicIpAddress
SYNOPSIS
Creates a public IP address.
SYNTAX
New-AzureRmPublicIpAddress -AllocationMethod {Dynamic | Static} [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DomainNameLabel <String>]
[-Force] [-IdleTimeoutInMinutes <Int32>] [-IpAddressVersion {IPv4 | IPv6}] [-IpTag
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSPublicIpTag]>] [-Location <String>] [-Name <String>]
-ResourceGroupName <String> [-ReverseFqdn <String>] [-Sku {Basic | Standard}] [-Tag <Hashtable>] [-Zone
<System.Collections.Generic.List`1[System.String]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmPublicIpAddress cmdlet creates a public IP address.
PARAMETERS
-AllocationMethod <String>
Specifies the method with which to allocate the public IP address. The acceptable values for this parameter are: Static or Dynamic.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-AsJob [<SwitchParameter>]
Run cmdlet in the background
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DomainNameLabel <String>
Specifies the relative DNS name for a public IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IdleTimeoutInMinutes <Int32>
Specifies the idle time-out, in minutes.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IpAddressVersion <String>
Specifies the version of the IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IpTag <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSPublicIpTag]>
IpTag List.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the region in which to create a public IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the public IP address that this cmdlet creates.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group in which to create a public IP address.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ReverseFqdn <String>
Specifies a reverse fully qualified domain name (FQDN).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Sku <String>
The public IP Sku name.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <Hashtable>
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <System.Collections.Generic.List`1[System.String]>
A list of availability zones denoting the IP allocated for the resource needs to come from.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
NOTES
1: Create a new public IP address
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location
This command creates a new public IP address resource.A DNS record is created for $dnsPrefix.$location.cloudapp.azure.com pointing to the public
IP address of this resource. A public IP address is immediately allocated to this resource as the -AllocationMethod is specified as 'Static'. If
it is specified as 'Dynamic', a public IP address gets allocated only when you start (or create) the associated resource (like a VM or load
balancer).
2: Create a public IP address with a reverse FQDN
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location -ReverseFqdn $customFqdn
This command creates a new public IP address resource. With the -ReverseFqdn parameter, Azure creates a DNS PTR record (reverse-lookup) for the
public IP address allocated to this resource, pointing to the $customFqdn specified in the command. As a pre-requisite, the $customFqdn (say
webapp.contoso.com) should have a DNS CNAME record (forward-lookup) pointing to $dnsPrefix.$location.cloudapp.azure.com.
3: Create a new public IP address with IpTag
$ipTag = New-AzureRmPublicIpTag -IpTagType "FirstPartyUsage" -Tag "/Sql"
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location -IpTags ipTag
This command creates a new public IP address resource.A DNS record is created for $dnsPrefix.$location.cloudapp.azure.com pointing to the public
IP address of this resource. A public IP address is immediately allocated to this resource as the -AllocationMethod is specified as 'Static'. If
it is specified as 'Dynamic', a public IP address gets allocated only when you start (or create) the associated resource (like a VM or load
balancer). An Iptag is used to specific the Tags associated with resource. Iptag can be specified using New-AzureRmPublicIpTag and passed as
input through -IpTags.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cipaddress
Get-AzureRmPublicIpAddress
Remove-AzureRmPublicIpAddress
Set-AzureRmPublicIpAddress
SYNOPSIS
Creates a public IP address.
SYNTAX
New-AzureRmPublicIpAddress -AllocationMethod {Dynamic | Static} [-AsJob] [-DefaultProfile <IAzureContextContainer>] [-DomainNameLabel <String>]
[-Force] [-IdleTimeoutInMinutes <Int32>] [-IpAddressVersion {IPv4 | IPv6}] [-IpTag
<System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSPublicIpTag]>] [-Location <String>] [-Name <String>]
-ResourceGroupName <String> [-ReverseFqdn <String>] [-Sku {Basic | Standard}] [-Tag <Hashtable>] [-Zone
<System.Collections.Generic.List`1[System.String]>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The New-AzureRmPublicIpAddress cmdlet creates a public IP address.
PARAMETERS
-AllocationMethod <String>
Specifies the method with which to allocate the public IP address. The acceptable values for this parameter are: Static or Dynamic.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-AsJob [<SwitchParameter>]
Run cmdlet in the background
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DomainNameLabel <String>
Specifies the relative DNS name for a public IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Forces the command to run without asking for user confirmation.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-IdleTimeoutInMinutes <Int32>
Specifies the idle time-out, in minutes.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IpAddressVersion <String>
Specifies the version of the IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-IpTag <System.Collections.Generic.List`1[Microsoft.Azure.Commands.Network.Models.PSPublicIpTag]>
IpTag List.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Location <String>
Specifies the region in which to create a public IP address.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Name <String>
Specifies the name of the public IP address that this cmdlet creates.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group in which to create a public IP address.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-ReverseFqdn <String>
Specifies a reverse fully qualified domain name (FQDN).
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Sku <String>
The public IP Sku name.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Tag <Hashtable>
Key-value pairs in the form of a hash table. For example:
@{key0="value0";key1=$null;key2="value2"}
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Zone <System.Collections.Generic.List`1[System.String]>
A list of availability zones denoting the IP allocated for the resource needs to come from.
Required? false
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
This cmdlet does not accept any input.
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
NOTES
1: Create a new public IP address
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location
This command creates a new public IP address resource.A DNS record is created for $dnsPrefix.$location.cloudapp.azure.com pointing to the public
IP address of this resource. A public IP address is immediately allocated to this resource as the -AllocationMethod is specified as 'Static'. If
it is specified as 'Dynamic', a public IP address gets allocated only when you start (or create) the associated resource (like a VM or load
balancer).
2: Create a public IP address with a reverse FQDN
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location -ReverseFqdn $customFqdn
This command creates a new public IP address resource. With the -ReverseFqdn parameter, Azure creates a DNS PTR record (reverse-lookup) for the
public IP address allocated to this resource, pointing to the $customFqdn specified in the command. As a pre-requisite, the $customFqdn (say
webapp.contoso.com) should have a DNS CNAME record (forward-lookup) pointing to $dnsPrefix.$location.cloudapp.azure.com.
3: Create a new public IP address with IpTag
$ipTag = New-AzureRmPublicIpTag -IpTagType "FirstPartyUsage" -Tag "/Sql"
$publicIp = New-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName -AllocationMethod Static -DomainNameLabel $dnsPrefix
-Location $location -IpTags ipTag
This command creates a new public IP address resource.A DNS record is created for $dnsPrefix.$location.cloudapp.azure.com pointing to the public
IP address of this resource. A public IP address is immediately allocated to this resource as the -AllocationMethod is specified as 'Static'. If
it is specified as 'Dynamic', a public IP address gets allocated only when you start (or create) the associated resource (like a VM or load
balancer). An Iptag is used to specific the Tags associated with resource. Iptag can be specified using New-AzureRmPublicIpTag and passed as
input through -IpTags.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cipaddress
Get-AzureRmPublicIpAddress
Remove-AzureRmPublicIpAddress
Set-AzureRmPublicIpAddress