< Back
Remove-AzureRmDnsRecordConfig
Post
NAME Remove-AzureRmDnsRecordConfig
SYNOPSIS
Removes a DNS record from a local record set object.
SYNTAX
Remove-AzureRmDnsRecordConfig -CaaFlags <Byte> -CaaTag <String> -CaaValue <String> [-DefaultProfile <IAzureContextContainer>] -RecordSet
<DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig -Cname <String> [-DefaultProfile <IAzureContextContainer>] -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Exchange <String> -Preference <UInt16> -RecordSet <DnsRecordSet>
[<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ipv4Address <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ipv6Address <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Nsdname <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Port <UInt16> -Priority <UInt16> -RecordSet <DnsRecordSet> -Target
<String> -Weight <UInt16> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ptrdname <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -RecordSet <DnsRecordSet> -Value <String> [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmDnsRecordConfig cmdlet removes a Domain Name System (DNS) record from a record set. The RecordSet object is an offline object,
and changes to it do not change the DNS responses until after you run the Set-AzureRmDnsRecordSet cmdlet to persist the change to the Microsoft
Azure DNS service.
To remove a record, all the fields for that record type must match exactly. You cannot add or remove SOA records. SOA records are automatically
created when a DNS zone is created and automatically deleted when the DNS zone is deleted.
You can pass the RecordSet object to this cmdlet as a parameter or by using the pipeline operator.
PARAMETERS
-CaaFlags <Byte>
The flags for the CAA record to add. Must be a number between 0 and 255.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CaaTag <String>
The tag field of the CAA record to add.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CaaValue <String>
The value field for the CAA record to add.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Cname <String>
Specifies the domain name for a canonical name (CNAME) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
-Exchange <String>
Specifies the mail exchange server name for a mail exchange (MX) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ipv4Address <String>
Specifies an IPv4 address for an A record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ipv6Address <String>
Specifies an IPv6 address for an AAAA record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Nsdname <String>
Specifies the name server for a name server (NS) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Port <UInt16>
Specifies the port for a service (SRV) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Preference <UInt16>
Specifies the preference for an MX record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Priority <UInt16>
Specifies the priority for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ptrdname <String>
Specifies the target domain name of a pointer (PTR) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecordSet <DnsRecordSet>
Specifies the RecordSet object that contains the record to remove.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Target <String>
Specifies the target for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Value <String>
Specifies the value for a TXT record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Weight <UInt16>
Specifies the weight for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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 pipe a DnsRecordSet object to this cmdlet. This is an offline representation of the record set and updates to it do not change DNS
responses until after you run Set-AzureRmDnsRecordSet.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns the modified RecordSet object.
NOTES
Example 1: Remove an A record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzureRmDnsRecordSet
This example removes an A record from an existing record set. If this is the only record in the record set, the result will be an empty record
set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 2: Remove an AAAA record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1005
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Ipv6Address 2001:DB80:4009:1005 | Set-AzureRmDnsRecordSet
This example removes an AAAA record from an existing record set. If this is the only record in the record set, the result will be an empty record
set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 3: Remove a CNAME record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Cname contoso.com | Set-AzureRmDnsRecordSet
This example removes a CNAME record from an existing record set. Because a CNAME record set can contain at most one record, the result is an empty
record set.
Example 4: Remove an MX record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-AzureRmDnsRecordSet
This example removes an MX record from an existing record set. The record name "@" indicates a record set at the zone apex. If this is the only
record in the record set, the result is an empty record set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 5: Remove an NS record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -Nsdname ns1.myzone.com -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Nsdname "ns1.myzone.com" | Set-AzureRmDnsRecordSet
This example removes an NS record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 6: Remove a PTR record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName 3.2.1.in-addr.arpa
PS C:\\> Remove-AzureRmDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName "3.2.1.in-addr.arpa" |
Remove-AzureRmDnsRecordConfig -Ptrdname www.contoso.com | Set-AzureRmDnsRecordSet
This example removes a PTR record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 7: Remove an SRV record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Priority 0 -Weight 5 -Port 8080 -Target target.example.com
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-AzureRmDnsRecordSet
This example removes an SRV record from an existing record set. If this is the only record in the record set, the result is an empty record set.
To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 8: Remove a TXT record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Value "This is a TXT Record" | Set-AzureRmDnsRecordSet
This example removes a TXT record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cordconfig
Add-AzureRmDnsRecordConfig
Get-AzureRmDnsRecordSet
Set-AzureRmDnsRecordSet
SYNOPSIS
Removes a DNS record from a local record set object.
SYNTAX
Remove-AzureRmDnsRecordConfig -CaaFlags <Byte> -CaaTag <String> -CaaValue <String> [-DefaultProfile <IAzureContextContainer>] -RecordSet
<DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig -Cname <String> [-DefaultProfile <IAzureContextContainer>] -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Exchange <String> -Preference <UInt16> -RecordSet <DnsRecordSet>
[<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ipv4Address <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ipv6Address <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Nsdname <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Port <UInt16> -Priority <UInt16> -RecordSet <DnsRecordSet> -Target
<String> -Weight <UInt16> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -Ptrdname <String> -RecordSet <DnsRecordSet> [<CommonParameters>]
Remove-AzureRmDnsRecordConfig [-DefaultProfile <IAzureContextContainer>] -RecordSet <DnsRecordSet> -Value <String> [<CommonParameters>]
DESCRIPTION
The Remove-AzureRmDnsRecordConfig cmdlet removes a Domain Name System (DNS) record from a record set. The RecordSet object is an offline object,
and changes to it do not change the DNS responses until after you run the Set-AzureRmDnsRecordSet cmdlet to persist the change to the Microsoft
Azure DNS service.
To remove a record, all the fields for that record type must match exactly. You cannot add or remove SOA records. SOA records are automatically
created when a DNS zone is created and automatically deleted when the DNS zone is deleted.
You can pass the RecordSet object to this cmdlet as a parameter or by using the pipeline operator.
PARAMETERS
-CaaFlags <Byte>
The flags for the CAA record to add. Must be a number between 0 and 255.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CaaTag <String>
The tag field of the CAA record to add.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-CaaValue <String>
The value field for the CAA record to add.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Cname <String>
Specifies the domain name for a canonical name (CNAME) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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
-Exchange <String>
Specifies the mail exchange server name for a mail exchange (MX) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ipv4Address <String>
Specifies an IPv4 address for an A record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ipv6Address <String>
Specifies an IPv6 address for an AAAA record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Nsdname <String>
Specifies the name server for a name server (NS) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Port <UInt16>
Specifies the port for a service (SRV) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Preference <UInt16>
Specifies the preference for an MX record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Priority <UInt16>
Specifies the priority for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Ptrdname <String>
Specifies the target domain name of a pointer (PTR) record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-RecordSet <DnsRecordSet>
Specifies the RecordSet object that contains the record to remove.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-Target <String>
Specifies the target for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Value <String>
Specifies the value for a TXT record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Weight <UInt16>
Specifies the weight for an SRV record.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
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 pipe a DnsRecordSet object to this cmdlet. This is an offline representation of the record set and updates to it do not change DNS
responses until after you run Set-AzureRmDnsRecordSet.
OUTPUTS
Microsoft.Azure.Commands.Dns.DnsRecordSet
This cmdlet returns the modified RecordSet object.
NOTES
Example 1: Remove an A record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv4Address 1.2.3.4
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType A -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Ipv4Address 1.2.3.4 | Set-AzureRmDnsRecordSet
This example removes an A record from an existing record set. If this is the only record in the record set, the result will be an empty record
set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 2: Remove an AAAA record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Ipv6Address 2001:DB80:4009:1005
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType AAAA -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Ipv6Address 2001:DB80:4009:1005 | Set-AzureRmDnsRecordSet
This example removes an AAAA record from an existing record set. If this is the only record in the record set, the result will be an empty record
set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 3: Remove a CNAME record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Cname contoso.com
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "www" -RecordType CNAME -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Cname contoso.com | Set-AzureRmDnsRecordSet
This example removes a CNAME record from an existing record set. Because a CNAME record set can contain at most one record, the result is an empty
record set.
Example 4: Remove an MX record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "@" -RecordType MX -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Exchange mail.microsoft.com -Preference 5 | Set-AzureRmDnsRecordSet
This example removes an MX record from an existing record set. The record name "@" indicates a record set at the zone apex. If this is the only
record in the record set, the result is an empty record set. To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 5: Remove an NS record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -Nsdname ns1.myzone.com -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "abc" -RecordType NS -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Nsdname "ns1.myzone.com" | Set-AzureRmDnsRecordSet
This example removes an NS record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 6: Remove a PTR record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName 3.2.1.in-addr.arpa
PS C:\\> Remove-AzureRmDnsRecordConfig -Ptrdname www.contoso.com -RecordSet $RecordSet
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "4" -RecordType PTR -ResouceGroupName "MyResourceGroup" -ZoneName "3.2.1.in-addr.arpa" |
Remove-AzureRmDnsRecordConfig -Ptrdname www.contoso.com | Set-AzureRmDnsRecordSet
This example removes a PTR record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 7: Remove an SRV record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Priority 0 -Weight 5 -Port 8080 -Target target.example.com
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "_sip._tcp" -RecordType SRV -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Priority 0 -Weight 5 -Port 8080 -Target target.example.com | Set-AzureRmDnsRecordSet
This example removes an SRV record from an existing record set. If this is the only record in the record set, the result is an empty record set.
To remove a record set entirely, see Remove-AzureRmDnsRecordSet.
Example 8: Remove a TXT record from a record set
PS C:\\> $RecordSet = Get-AzureRmDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com"
PS C:\\> Remove-AzureRmDnsRecordConfig -RecordSet $RecordSet -Value "This is a TXT Record"
PS C:\\> Set-AzureRmDnsRecordSet -RecordSet $RecordSet
# The above sequence can also be piped:
PS C:\\> Get-AzureRmDnsRecordSet -Name "text" -RecordType TXT -ResouceGroupName "MyResourceGroup" -ZoneName "myzone.com" |
Remove-AzureRmDnsRecordConfig -Value "This is a TXT Record" | Set-AzureRmDnsRecordSet
This example removes a TXT record from an existing record set. If this is the only record in the record set, the result is an empty record set. To
remove a record set entirely, see Remove-AzureRmDnsRecordSet.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... cordconfig
Add-AzureRmDnsRecordConfig
Get-AzureRmDnsRecordSet
Set-AzureRmDnsRecordSet