Recently we switched the names of two computers in a small network. Let's say the first was visible as one on the network and the other was two. We just switched their names. The Windows XP machines on the network have picked up the change but there is one Windows 7 PC that has not updated its computer name to computer IP address mapping.

Is there a way in Windows 7 to clear or refresh the record of the cached names?


In Command Prompt run ipconfig /flushdns

  • 1
    Well, the problem was that for some reason the computer name to ip address mapping was hardcoded in the "System32\drivers\etc\hosts" file =) Thanks for the help, much appreciated! – xenry Nov 10 '10 at 17:42

You need to clear both the DNS and NetBIOS name caches. According to the Microsoft support article Microsoft TCP/IP Host Name Resolution Order both are used in Windows to cache hostnames.

Do this from an elevated Command Prompt by running these two commands:

ipconfig /flushdns
nbtstat -R

(The -R is case-sensitive)

If you're still having trouble, double-check the Windows Hosts file to ensure a static name mapping hasn't been configured. On Windows NT and above the hosts file is located in the folder %Systemroot%\System32\Drivers\Etc and is named hosts (without a file extension).


Ok, do you have AD in your network? Anyway, try to disable Microsoft Computer Browser Service service in win7. You must wait more than 15 min to see effect.


I know this is an old issue, but here is something I tried, and it worked:

  • open services.msc on the affected PC
  • find the Computer Browser service
  • Stop the service
  • Refresh File Browser with the network location open
  • Start the Computer Browser service

Your new name should appear.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.