Remove SRV records using DNSCMD

jpgillivan
jpgillivan used Ask the Experts™
on
What is the exact command (with parameters) to remove a SRV record from DNS on a 2003 server using DNSCMD?

I've done a lot of searching for the exact command format (with examples) but I have been unsuccessful.  

Please don't give me links to sites that simply talk about it or that have examples for adding records only.  My search is very specific looking for how to remove SRV records.
Please don't reply unless you know the proper format for sure.  Don't give me strings that you "think" might work. I need what does work.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2014
Commented:
Here's an example.
dnscmd <srvname> /recorddelete _msdcs.domain.com _ldap._tcp.gc SRV 0 100 3268 dc1.domain.com.

Open in new window


If you were to look at this record's properties prior to deletion, you would see the following info:
Domain:  gc._msdcs.domain.com
Service:  _ldap
Protocol:  _tcp
Priority:  0
Weight:  100
Port Number:  3268
Host offering this service:  dc1.domain.com.
DrDave242Principal Support Engineer

Commented:
Footech's syntax is correct. I'm just commenting to add that you don't have to specify every parameter, only as many as you need to uniquely identify the particular record or records you want to delete. To use the example above, if there were only one SRV record named gc in that location, you could leave out everything after "SRV" in the command (the priority, weight, port number and hostname).
jpgillivanConsultant

Author

Commented:
Footech, The command as accepted.  Thanks.  However for some reason the record keeps popping back in to DNS.  The issue here is that someone tried to install a 2012 server as a DC in to a 2003 domain.  The user did not realize this until afterward that 2003 to 2012 is not an upgrade path.  He removed the 2012 server and had issue. He called us and we seized the roles back to the 2003 box.  I am in the process of migrating to 2008 then to 2012/16.  I have manually cleaned up a lot of left over entries from the incorrect server but the SRV records keep coming back and I think that is causing issues as when we unplug the 2003 box, no one can log in to the domain even though the 2008 box is up and (DNS, DHCP and AD running).
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

We can definitely assist with that, I would recommend opening up another question for that.
Top Expert 2014

Commented:
There is no problem with installing a Server 2012 DC in a domain with Server 2003 DCs.  The domain functional level must be 2003 though.
https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/upgrade-domain-controllers-to-windows-server-2012-r2-and-windows-server-2012#BKMK_FunctionalLevels

You'd have to describe exactly what SRV records are involved.  The majority of SRV records are automatically registered by each DC for itself.  The Netlogon service does this at startup and every 60 minutes.  You may want to have a look at the netlogon.dns file for incorrect entries.  If found, you may need to stop the Netlogon service, delete/rename the netlogon.dns and netlogon.dnb files, and start the Netlogon service.

I do recommend opening a new question though so more experts will see the current issue you have, and you can describe more fully.
jpgillivanConsultant

Author

Commented:
Footech, I meant to say that the client tried to install server 2016 DC.
Top Expert 2014

Commented:
Still not an issue - https://docs.microsoft.com/en-us/windows-server/identity/ad-ds/deploy/upgrade-domain-controllers#functional-level-features-and-requirements
If the FFL was at Server 2000 level, the install of a 2016 DC would be blocked.  If it was at Server 2003 level, there would be no issue.  Something else is going on. I stand by my previous recommendations.
jpgillivanConsultant

Author

Commented:
Footech, I have examined the netlogon.dns and there are no records of the removed 2016 server.  Yet, they still remain in DNS.
jpgillivanConsultant

Author

Commented:
I'm marking this as resolved for the question originally asked as the command worked.  There appears to be deeper issues that I have to look in to.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial