This project is read-only.

Get-DNSRecord: Critical error

Mar 5, 2012 at 1:22 PM

Hi,

First of all, thank you for these awsome set of cmdlets ... I think they could save me lot of time :o)

But I have a little problem doing a cleaning task of my reverse zone. I have a reverse zone that contains about 180 000 records and I need to get the records that has a record timestamp less than (now - 14Days). The command I use is:

$OldDate = (get-date).Subtract($(new-timespan -Days 14))
get-DnsRecord -RecordType PTR -ZoneName "10.in-addr.arpa" -Server DC1.contoso.com | wherer{$_.TimeStamp -lt $oldDate}

This command returns some results but after a little while I got the error:

Get-DnsRecord: Critical error
At line:1 char:14
+ get-DnsRecord <<<<   -Recordtype PTR -ZoneName "10.in-addr.arpa" -Server DC1.contoso.com
   + CategoryInfo                    : NotSpecified:  (:]  [get-DnsRecord],  ManagementException
    +  FullyQualifiedErrorId       : System.Management.ManagementException,DnsShell.PowerShell.CmdLet.DnsRecord

In a previous post you said that using Get-ADDnsRecord give the same result, but I only got the @ record when launching

Get-ADDnsRecord -SearchRoot "DC=10.in-addr.arpa,CN=MicrosoftDNS,DC=InternalDNSZones,DC=Contoso,DC=Com" -Server DC1.consoto.com

Has someone already have this kind of trouble?
Is there some limitation with the Get-DNSRecord ?

Thanks in advance for your answer