< Back
Set-AzureRmDnsRecordSet
Post
NAME Set-AzureRmDnsRecordSet
SYNOPSIS
Updates a DNS record set.
SYNTAX
Set-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Overwrite] -RecordSet <DnsRecordSet> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmDnsRecordSet cmdlet updates a record set in the Azure DNS service from a local RecordSet object.
You can pass a RecordSet object as a parameter or by using the pipeline operator.
You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for confirmation.
The record set is not updated if it has been changed in Azure DNS since the local RecordSet object was retrieved. This provides protection for
concurrent changes. You can suppress this behavior using the Overwrite parameter, which updates the record set regardless of concurrent changes.
PARAMETERS
-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
-Overwrite [<SwitchParameter>]
Indicates to update the record set regardless of concurrent changes.
The record set will not be updated if it has been changed in Azure DNS since the local RecordSet object was retrieved. This provides
protection for concurrent changes. To suppress this behavior, you can use the Overwrite parameter, which results in the record set being
updated regardless of concurrent changes.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-RecordSet <DnsRecordSet>
Specifies the RecordSet to update.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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.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
Microsoft.Azure.Commands.Dns.DnsRecordSet
You can pass a RecordSet object to this cmdlet.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns an object that represents the updated RecordSet object.
NOTES
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the cmdlet prompts you for
confirmation if the $ConfirmPreference Windows PowerShell variable has a value of Medium or lower.
If you specify Confirm or Confirm:$True , this cmdlet prompts you for confirmation before it runs. If you specify Confirm:$False , the cmdlet
does not prompt you for confirmation.
Example 1: Update a record set
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType A
PS C:\\> Add-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.16.0.0
PS C:\\> Add-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.31.255.255
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# These cmdlets can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType A | Add-AzureRmDnsRecordConfig
-Ipv4Address 172.16.0.0 | Add-AzureRmDnsRecordConfig -Ipv4Address 172.31.255.255 | Set-AzureRmDnsRecordSet
The first command uses the Get-AzureRmDnsRecordSet cmdlet to get the specified record set, and then stores it in the $RecordSet variable.
The second and third commands are off-line operations to add two A records to the record set.
The final command uses the Set-AzureRmDnsRecordSet cmdlet to commit the update.
Example 2: Update an SOA record
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -Name "@" -RecordType SOA -Zone $Zone
PS C:\\> $RecordSet.Records[0].Email = "admin.myzone.com"
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
The first command uses the Get-AzureRmDnsRecordset cmdlet to get the specified record set, and then stores it in the $RecordSet variable.
The second command updates the specified SOA record in $RecordSet.
The final command uses the Set-AzureRmDnsRecordSet cmdlet to propagate the update in $RecordSet.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... srecordset
Get-AzureRmDnsRecordSet
New-AzureRmDnsRecordSet
Remove-AzureRmDnsRecordSet
SYNOPSIS
Updates a DNS record set.
SYNTAX
Set-AzureRmDnsRecordSet [-DefaultProfile <IAzureContextContainer>] [-Overwrite] -RecordSet <DnsRecordSet> [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmDnsRecordSet cmdlet updates a record set in the Azure DNS service from a local RecordSet object.
You can pass a RecordSet object as a parameter or by using the pipeline operator.
You can use the Confirm parameter and $ConfirmPreference Windows PowerShell variable to control whether the cmdlet prompts you for confirmation.
The record set is not updated if it has been changed in Azure DNS since the local RecordSet object was retrieved. This provides protection for
concurrent changes. You can suppress this behavior using the Overwrite parameter, which updates the record set regardless of concurrent changes.
PARAMETERS
-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
-Overwrite [<SwitchParameter>]
Indicates to update the record set regardless of concurrent changes.
The record set will not be updated if it has been changed in Azure DNS since the local RecordSet object was retrieved. This provides
protection for concurrent changes. To suppress this behavior, you can use the Overwrite parameter, which results in the record set being
updated regardless of concurrent changes.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-RecordSet <DnsRecordSet>
Specifies the RecordSet to update.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
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.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
Microsoft.Azure.Commands.Dns.DnsRecordSet
You can pass a RecordSet object to this cmdlet.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns an object that represents the updated RecordSet object.
NOTES
You can use the Confirm parameter to control whether this cmdlet prompts you for confirmation. By default, the cmdlet prompts you for
confirmation if the $ConfirmPreference Windows PowerShell variable has a value of Medium or lower.
If you specify Confirm or Confirm:$True , this cmdlet prompts you for confirmation before it runs. If you specify Confirm:$False , the cmdlet
does not prompt you for confirmation.
Example 1: Update a record set
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType A
PS C:\\> Add-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.16.0.0
PS C:\\> Add-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 172.31.255.255
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# These cmdlets can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -ResourceGroupName MyResourceGroup -ZoneName myzone.com -Name www -RecordType A | Add-AzureRmDnsRecordConfig
-Ipv4Address 172.16.0.0 | Add-AzureRmDnsRecordConfig -Ipv4Address 172.31.255.255 | Set-AzureRmDnsRecordSet
The first command uses the Get-AzureRmDnsRecordSet cmdlet to get the specified record set, and then stores it in the $RecordSet variable.
The second and third commands are off-line operations to add two A records to the record set.
The final command uses the Set-AzureRmDnsRecordSet cmdlet to commit the update.
Example 2: Update an SOA record
PS C:\\>$RecordSet = Get-AzureRmDnsRecordSet -Name "@" -RecordType SOA -Zone $Zone
PS C:\\> $RecordSet.Records[0].Email = "admin.myzone.com"
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
The first command uses the Get-AzureRmDnsRecordset cmdlet to get the specified record set, and then stores it in the $RecordSet variable.
The second command updates the specified SOA record in $RecordSet.
The final command uses the Set-AzureRmDnsRecordSet cmdlet to propagate the update in $RecordSet.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... srecordset
Get-AzureRmDnsRecordSet
New-AzureRmDnsRecordSet
Remove-AzureRmDnsRecordSet