< Back
Set-AzureRmPublicIpAddress
Post
NAME Set-AzureRmPublicIpAddress
SYNOPSIS
Sets the goal state for a public IP address.
SYNTAX
Set-AzureRmPublicIpAddress [-AsJob] [-DefaultProfile <IAzureContextContainer>] -PublicIpAddress <PSPublicIpAddress> [<CommonParameters>]
DESCRIPTION
The Set-AzureRmPublicIpAddress cmdlet sets the goal state for a public IP address.
PARAMETERS
-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
-PublicIpAddress <PSPublicIpAddress>
Specifies a PublicIpAddress object that represents the goal state to which the public IP address should be set.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
PSPublicIpAddress
Parameter 'PublicIpAddress' accepts value of type 'PSPublicIpAddress' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
NOTES
1: Change allocation method of a public IP address
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
PS C:\\> $publicIp.PublicIpAllocationMethod = "Dynamic"
PS C:\\> Set-AzureRmPublicIpAddress -PublicIpAddress $publicIp
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
First command gets the public IP address resource with name $publicIPName in the resource group $rgName. Second command sets the
allocation method of the public IP address object to "Static". Set-AzureRmPublicIPAddress command updates the public IP address resource with
the updated object, and modifies the allocation method to 'Static'. A public IP address gets allocated immediately.
2: Change DNS domain label of a public IP address
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
PS C:\\> $publicIp.DnsSettings.DomainNameLabel = "newdnsprefix"
PS C:\\> Set-AzureRmPublicIpAddress -PublicIpAddress $publicIp
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
First command gets the public IP address resource with name $publicIPName in the resource group $rgName. Second command sets the
DomainNameLabel property to the required dns prefix. Set-AzureRmPublicIPAddress command updates the public IP address resource with the
updated object. DomainNameLabel & Fqdn are modified as expected.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cipaddress
Get-AzureRmPublicIpAddress
New-AzureRmPublicIpAddress
Remove-AzureRmPublicIpAddress
SYNOPSIS
Sets the goal state for a public IP address.
SYNTAX
Set-AzureRmPublicIpAddress [-AsJob] [-DefaultProfile <IAzureContextContainer>] -PublicIpAddress <PSPublicIpAddress> [<CommonParameters>]
DESCRIPTION
The Set-AzureRmPublicIpAddress cmdlet sets the goal state for a public IP address.
PARAMETERS
-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
-PublicIpAddress <PSPublicIpAddress>
Specifies a PublicIpAddress object that represents the goal state to which the public IP address should be set.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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
PSPublicIpAddress
Parameter 'PublicIpAddress' accepts value of type 'PSPublicIpAddress' from the pipeline
OUTPUTS
Microsoft.Azure.Commands.Network.Models.PSPublicIpAddress
NOTES
1: Change allocation method of a public IP address
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
PS C:\\> $publicIp.PublicIpAllocationMethod = "Dynamic"
PS C:\\> Set-AzureRmPublicIpAddress -PublicIpAddress $publicIp
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
First command gets the public IP address resource with name $publicIPName in the resource group $rgName. Second command sets the
allocation method of the public IP address object to "Static". Set-AzureRmPublicIPAddress command updates the public IP address resource with
the updated object, and modifies the allocation method to 'Static'. A public IP address gets allocated immediately.
2: Change DNS domain label of a public IP address
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
PS C:\\> $publicIp.DnsSettings.DomainNameLabel = "newdnsprefix"
PS C:\\> Set-AzureRmPublicIpAddress -PublicIpAddress $publicIp
PS C:\\> $publicIp = Get-AzureRmPublicIpAddress -Name $publicIpName -ResourceGroupName $rgName
First command gets the public IP address resource with name $publicIPName in the resource group $rgName. Second command sets the
DomainNameLabel property to the required dns prefix. Set-AzureRmPublicIPAddress command updates the public IP address resource with the
updated object. DomainNameLabel & Fqdn are modified as expected.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cipaddress
Get-AzureRmPublicIpAddress
New-AzureRmPublicIpAddress
Remove-AzureRmPublicIpAddress