Delete SRV DNS Records for Orphaned DC

Broonster 51 Reputation points
2022-06-17T05:34:35.473+00:00

Hi There,

I'm having the issue where I can't delete the SRV DNS records for a DC that wasn't properly demoted. Using ADSIedit I have manged to properly delete nearly all of them but I can't work out how to delete the one in _ldap._tcp.dc._msdcs.

212381-image.png

When I go into ADSIedit the value I need to delete is one of the 150 hex values stored in the dnsRecord attribute but I haven't a clue which one to delete as I forgot to keep a copy of the hex value before I removed it from the other attributes as part of this cleanup process.
212277-image.png

Any idea how I can find the correct value to delete?

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
0 comments No comments
{count} vote

Accepted answer
  1. Gary Reynolds 9,621 Reputation points
    2022-06-19T02:32:01.957+00:00

    The LDAP Browser option in NetTools will decode the dnsrecord attribute, these will be displayed in the same order as adsiedit, then you can use adsiedit to delete the same entry in attribute.

    Gary.


6 additional answers

Sort by: Most helpful
  1. Riaan-VS 386 Reputation points
    2022-06-17T06:17:04.163+00:00

    Is your DC still listed in Sites & Services?

    1 person found this answer helpful.

  2. Agarwal, Mayank 6 Reputation points
    2023-01-12T06:31:20.85+00:00

    Please check this powershell script to find and delete all dns entries for an orphaned DC

    CLeanup SRV Records Script

    1 person found this answer helpful.
    0 comments No comments

  3. Anonymous
    2022-06-17T12:53:51.83+00:00

    Read on here.
    https://devblogs.microsoft.com/scripting/clean-up-domain-controller-dns-records-with-powershell/

    --please don't forget to upvote and Accept as answer if the reply is helpful--


  4. Anonymous
    2022-06-18T22:34:42.697+00:00

    Maybe this tool helps.
    https://learn.microsoft.com/en-us/sysinternals/downloads/adexplorer

    --please don't forget to upvote and Accept as answer if the reply is helpful--

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.