dmarussi
(Fresh Scripter)
2004-06-10 07:48 PM
how to remove a DNS entry

Is there anyway to remove a DNS entry on windows 2000 and XP pro boxes thru a kix script? Specifically I need the second entry deleted. Thanks in advance for any help...

dmarussi
(Fresh Scripter)
2004-06-10 08:00 PM
Re: how to remove a DNS entry

ps...in case i've confused anyone all of these pc's have statically assigned ip's and DNS.

AllenAdministrator
(KiX Supporter)
2004-06-10 08:23 PM
Re: how to remove a DNS entry

You might take a look at CheckNICs() in the UDF forum.

Also, I believe you might have some luck with Netsh.exe as well.


Les
(KiX Master)
2004-06-10 10:54 PM
Re: how to remove a DNS entry

If you were to listen to M$, they would tell you to use NetSH.

AllenAdministrator
(KiX Supporter)
2004-06-11 04:28 AM
Re: how to remove a DNS entry

I decided to see if I could figure out the syntax of Netsh. I believe all you need to do is change the IP address below to match the IP of the server you want to delete.

Code:
 
shell '%compspec% /c netsh interface ip delete dns "Local Area Connection" 192.168.0.2'