Solved

AAAA records in DNS

Posted on 2014-10-14
4
176 Views
Last Modified: 2014-10-20
HI Guys,

We have server 2008 R2 running DNS and there are many AAAA records that i need to delete,

is there a powershell commnad that can find all the dns with the AAAA and then delete them?

Thank you in advance .

Regards,
K
0
Comment
Question by:Kay
  • 2
4 Comments
 
LVL 32

Expert Comment

by:it_saige
ID: 40380311
I think that this will point you down the right path.

http://rcmtech.wordpress.com/2014/02/26/get-and-delete-dns-a-and-ptr-records-via-powershell/

-saige-
0
 
LVL 28

Expert Comment

by:becraig
ID: 40380317
So you can look into using:
Get-DnsServerResourceRecord

A potential script might look like:

$DNSServer = "dns01.domain.local"
$ZoneName = "domain.local"
$NodeDNS = $null
$NodeDNS = Get-DnsServerResourceRecord -ZoneName $ZoneName -ComputerName $DNSServer -RRType AAAA -ErrorAction SilentlyContinue
if($NodeDNS -eq $null){
    Write-Host "No DNS record found"
} else {
    Remove-DnsServerResourceRecord -ZoneName $ZoneName -ComputerName $DNSServer -InputObject $NodeDNS -Force
}

Open in new window

0
 
LVL 28

Expert Comment

by:becraig
ID: 40380357
A little more info on the DNS PS commands:
http://technet.microsoft.com/en-us/library/jj649863.aspx

This will really help you.
0
 
LVL 39

Accepted Solution

by:
footech earned 500 total points
ID: 40380397
Except 2008 R2 doesn't have those DNS commands...
You could look into DNSShell by Chris Dent.  https://dnsshell.codeplex.com/
Otherwise I think you're looking at parsing output from dnscmd, or I think I've heard of using WMI to modify DNS, but I've never looked into that.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this previous article (https://oddytee.wordpress.com/2016/05/05/provision-new-office-365-user-and-mailbox-from-exchange-hybrid-via-powershell/), we made basic license assignments to users in O365. When I say basic, the method is the simplest way …
Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now