We had something similar when our primary WINS/DNS server IP changed. I was able to change most of the non-DHCP clients with a startup script using netsh, since most machines used the default connection names. If that works for you, try something like this.
I'm sure it can be cleaner, but here are my two sanitized cmd files, which check for 3 common interface names. In our case, it got most of the machines, and the few that were left we fixed as found. YMMV: Rem Startup Script for Updating Static WINS and DNS configuration Rem to point to new server addresses. Copies Fixipcfg.cmd locally Rem and runs from local computer. Rem Last updated 2006-11-13 BLM IF EXIST %systemroot%\FixIPCfg.txt goto end xcopy /Q /H /R /K /Y "\\server\sharename\fixipcfg.cmd" "%systemroot%" %systemroot%\fixipcfg.cmd :end exit Calls the next file named fixipcfg.cmd Rem Startup Script for Updating Static WINS and DNS configuration Rem to point to new server addresses. Rem Script copied locally and called by FixIPStf.cmd Rem Last updated 2006-11-13 BLM IF EXIST %systemroot%\FixIPCfg.txt goto end :CheckLA1 %systemroot%\system32\netsh interface ip show address "Local Area Connection" | find /c /I "No" IF ERRORLEVEL 1 goto wrLA1no goto fixitLA1 :fixitLA1 %systemroot%\system32\netsh interface ip delete dns "Local Area Connection" all %systemroot%\system32\netsh interface ip add dns "Local Area Connection" 10.0.0.1 %systemroot%\system32\netsh interface ip add dns "Local Area Connection" 10.0.0.2 %systemroot%\system32\netsh interface ip delete wins "Local Area Connection" all %systemroot%\system32\netsh interface ip add wins "Local Area Connection" 10.0.0.1 %systemroot%\system32\netsh interface ip add wins "Local Area Connection" 10.0.0.2 goto wrLA1yes :wrLA1yes echo Local Area Network Static IP configuration Updated Successfully! >> %systemroot%\FixIPCFG.txt goto CheckLA2 :wrLA1no echo DHCP or no IP configuration on Local Area Network. Update not required! >> %systemroot%\FixIPCFG.txt goto CheckLA2 :CheckLA2 %systemroot%\system32\netsh interface ip show address "Local Area Connection #2" | find /c /I "No" IF ERRORLEVEL 1 goto wrLA2no goto fixitLA2 :fixitLA2 %systemroot%\system32\netsh interface ip delete dns "Local Area Connection #2" all %systemroot%\system32\netsh interface ip add dns "Local Area Connection #2" 10.0.0.1 %systemroot%\system32\netsh interface ip add dns "Local Area Connection #2" 10.0.02 %systemroot%\system32\netsh interface ip delete wins "Local Area Connection #2" all %systemroot%\system32\netsh interface ip add wins "Local Area Connection #2" 10.0.0.1 %systemroot%\system32\netsh interface ip add wins "Local Area Connection #2" 10.0.0.2 goto wrLA2yes :wrLA2yes echo Local Area Network #2 Static IP configuration Updated Successfully! >> %systemroot%\FixIPCFG.txt goto CheckWrs :wrLA2no echo DHCP or no IP configuration on Local Area Network #2. Update not required! >> %systemroot%\FixIPCFG.txt goto CheckWrs :CheckWrs %systemroot%\system32\netsh interface ip show address "Wireless Network Connection" | find /c /I "No" IF ERRORLEVEL 1 goto wrWrsno goto fixitWrs :fixitWrs %systemroot%\system32\netsh interface ip delete dns "Wireless Network Connection" all %systemroot%\system32\netsh interface ip add dns "Wireless Network Connection" 10.0.0.1 %systemroot%\system32\netsh interface ip add dns "Wireless Network Connection" 10.0.0.2 %systemroot%\system32\netsh interface ip delete wins "Wireless Network Connection" all %systemroot%\system32\netsh interface ip add wins "Wireless Network Connection" 10.0.0.1 %systemroot%\system32\netsh interface ip add wins "Wireless Network Connection" 10.0.0.2 goto wrWrsyes :wrWrsyes echo Wireless Network Connection Static IP configuration Updated Successfully! >> %systemroot%\FixIPCFG.txt goto end :wrWrsno echo DHCP or no IP configuration on Wireless Network Connection. Update not required! >> %systemroot%\FixIPCFG.txt goto end :end exit -Bonnie From: Christopher Bodnar [mailto:[email protected]] Sent: Friday, March 13, 2009 12:05 PM To: NT System Admin Issues Subject: RE: Removing a 2003 DC DCPROMO should do what you want with no issues. Is anything pointing to this as a DNS server? I think that might be the biggest hurdle. Changing the IP address of any machines that have this machine configured as a DNS server. Chris Bodnar, MCSE Sr. Systems Engineer Distributed Systems Service Delivery - Intel Services Guardian Life Insurance Company of America Email: [email protected]<mailto:[email protected]> Phone: 610-807-6459 Fax: 610-807-6003 ________________________________ From: David Mazzaccaro [mailto:[email protected]] Sent: Friday, March 13, 2009 2:53 PM To: NT System Admin Issues Subject: Removing a 2003 DC I have a very old (white box) Windows 2003 SP2 Domain Controller that I would like to decomission. It does not hold any of the FSMO roles, but IS a DNS server. I have another 2003 SP2 Domain Controller that DOES hold all FSMO rolls and is also a DNS server. What is the best (cleanest) way to remove the old server? Run DCPROMO on the white box and demote it to a member server, then remove it from the domain? Any other steps? What do I do about DNS? Should I remove DNS first, then demote it and remove it from the domain? It isn't running any other services. Just is a secondary domain controller and DNS server. Thanks ________________________________ This message, and any attachments to it, may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient, you are notified that any use, dissemination, distribution, copying, or communication of this message is strictly prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and delete the message and any attachments. Thank you. ~ Finally, powerful endpoint security that ISN'T a resource hog! ~ ~ <http://www.sunbeltsoftware.com/Business/VIPRE-Enterprise/> ~
