none
Removing Old DNS Entries of Decommissioned Servers RRS feed

  • Question

  • I have a challenge on my hands where I am going through and finding all old servers on our network and removing them from AD. These servers were basically just shutdown removed from the network leaving the computer account and DNS entries intact. So I have been using Powershell to find the old servers and remove the computer account from AD. This is working fine but I will also need to remove the static DNS entries for these servers as part of the cleanup. Is there a way to remove the DNS "A" record from DNS using PowerShell or some other non-manual (one by one way) if I use the same list of server names used to remove them from AD? I hope this makes sense and any help is much appreciated!



    Chad Guiney

    Wednesday, September 18, 2019 4:05 PM

Answers

All replies

  • You can probably enable some DNS scavenging.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Wednesday, September 18, 2019 4:48 PM
  • Thanks for the reply Dave and I should have specified that the entries I am trying to remove are actually static entries and do not have a timestamp on them for scavenging to take place. Otherwise yes our scavenging is set to 1 day and those entries are removed regularly.

    Thanks.


    Chad Guiney

    Wednesday, September 18, 2019 5:55 PM
  • Might give this one a go.

    https://gallery.technet.microsoft.com/scriptcenter/Lookup-Create-Delete-any-f23229b2

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    • Marked as answer by Charlie4872 Friday, September 20, 2019 12:05 PM
    Wednesday, September 18, 2019 6:27 PM
  • Hi Charlie4872,
    Thank you for posting in our TechNet forum.

    I also agree with Dave Patrick's point of view.

    If there is anything else we can do for you, please feel free to post in the forum.

    hope the information can be helpful

    Regards,
    Vicky

    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Thursday, September 19, 2019 8:20 AM
  • I will give the script a try and see how that goes. I really appreciate the help with this!

    Chad Guiney

    Thursday, September 19, 2019 12:16 PM
  • Sounds good, you're welcome.

     

    (please don't forget to mark helpful replies as answer)

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Thursday, September 19, 2019 12:53 PM
  • Dave thank you so much for pointing me to this script. It works Great! This is exactly the kind of thing I was looking for. Thanks again for your help.



    Chad Guiney

    Friday, September 20, 2019 12:05 PM
  • Glad to hear this, you're welcome.

     

     



    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows Server] Datacenter Management

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.

    Friday, September 20, 2019 12:40 PM
  • Hi,

    I am glad to hear that your issue was successfully resolved.

    If there is anything else we can do for you, please feel free to post in the forum.

    Havea nice day!

    Vicky


    Please remember to mark the replies as answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Tuesday, September 24, 2019 1:08 AM