Solved

AAAA records in DNS

Posted on 2014-10-14
4
183 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 33

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 29

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 29

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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
A procedure for exporting installed hotfix details of remote computers using powershell
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…
This tutorial will walk an individual through locating and launching the BEUtility application to properly change the service account username and\or password in situation where it may be necessary or where the password has been inadvertently change…

911 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

17 Experts available now in Live!

Get 1:1 Help Now