Link to home
Start Free TrialLog in
Avatar of Julian123
Julian123

asked on

Leftover DNS records after removing a domain controller

I followed the MS protocols documented on technet to remove several domain controllers that were also acting as a DNS servers. I'm still seeing a number of DNS records referencing the old server:
1. NS records in the _msdcs.mydomain.local zone
2. Some SRV records under _msdcs
3. Some under domaindnszones under mydomain.local
4. Some under forestdnszones under mydomain.local

I see these for several DCs I removed. Some are from mydomain.local and some are from subdomain.mydomain.local.

I saw no errors during the dcpromo process for any DC and I'm seeing several DCs listed so I'm assuming this is not some one-time dcpromo error.

Why are these records there? Will they be automatically removed at some point? If not, how do I remove them?


Avatar of Gastone Canali
Gastone Canali
Flag of Italy image

"I saw no errors during the dcpromo process for any DC"
BUT in the event viewer there is some errors?

If there isn't errors, try the script to have some information more , and then remove the leftover dns record, but pay attention...

Gastone
Function fGetDCList()
 ' AUTHOR: DiGiTAL SkReAM
 ' CONTACT: digital.skream@gmail.com
 ' DATE  : 4/8/2006
 ' COMMENT: Will return a list of all of the Domain Controllers in an
 '        Active Directory domain.
 Dim oRoot, sConfigNamingContext, oADOConnection, oADOCommand, sADOQuery
 Dim oRecordSet, oDC, oSite, oCat, iErr
 fGetDCList = "N/A"
 On Error Resume Next 
  Set oRoot = GetObject("LDAP://RootDSE")
  iErr = Err.Number
 On Error GoTo 0 
  If iErr = 0 Then 
   sConfigNamingContext = oRoot.Get("configurationNamingContext")
   Set oADOCommand = CreateObject("ADODB.Command")
   Set oADOConnection = CreateObject("ADODB.Connection")
   oADOConnection.Provider = "ADsDSOObject"
   oADOConnection.Open "Active Directory Provider"
   oADOCommand.ActiveConnection = oADOConnection
   sADOQuery = "<LDAP://" & sConfigNamingContext & ">;(ObjectClass=nTDSDSA);AdsPath;subtree"
   oADOCommand.CommandText = sADOQuery
   oADOCommand.Properties("Page Size") = 100
   oADOCommand.Properties("Timeout") = 30
   oADOCommand.Properties("Cache Results") = False
   Set oRecordSet = oADOCommand.Execute
   'Set oCat = New StringCat
    Do Until oRecordSet.EOF
      Set oDC = GetObject(GetObject(oRecordSet.Fields("AdsPath")).Parent)
      wscript.echo "Netbios_Name : " & oDC.cn
       wscript.echo  "FQDN : " & oDC.DNSHostName & VbCrLf 
      oRecordSet.MoveNext
    Loop
   oADOConnection.Close
   'fGetDCList = oCat.Flush
  End If 
 End Function
call fGetDCList()

Open in new window

Is you DNS set to scavenging?
how many days has passed after u removed DC?
Avatar of Julian123
Julian123

ASKER

I have manually initiated scavenging. I removed my DC serveral days ago (about 7)
ASKER CERTIFIED SOLUTION
Avatar of Wasim Shaikh
Wasim Shaikh
Flag of United Arab Emirates image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial