Script Required to delete duplicate DNS records
Posted on 2008-06-25
We are having an issue with DNS records being duplicated in Active directory. Domain controllers are running Windows server 2003.
If a user connects in from home over the VPN the following day when they try and connect in the office they are having problems connecting to parts of the network as the dns record discovered using nslookup and other tools does not match the settings on their PC. Looking into the DNS records they have 1 DNS record with their normal IP address and then a second entry with the IP address assigned to the vpn connection. The vpn connections are created using a Cisco VPN3005 concentrator.
This can happen to a few select people and they will not be able to connect to devices on our network until the "vpn" DNS record is removed.
I was thinking that a script could be run in powershell that will search for multiple instances of that user and then remove the false record. For example we have a record markc.domain.ds whio normally is assigned an ip address of 192.168.15.114, however after using the vpn connection he also has a record for the ip address 192.168.0.71 and this causes the conflict.
Alternatively if anyone could suggest a settings change to our DNS system that would clear these records that would work just as well. we are thinking that it would be a setting on the Cisco Concentrator that needs changing.
any and all help welcome