Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I have following entry in hosts.cfg file: test # foo machine

I start script that every second call ping test and cat \\test\share\machine-name.txt

Script output: IP:; machine name: foo

Then I change hosts.cfg to following: test # bar machine

Now script output is following: IP:; machine name: foo # bar is expected!

Problem: \\test\share\machine-name.txt still points to old location

I've found only one solution how to resolve this problem: restart LanmanWorkstation service. But the problem with LanmanWorkstation service is that it takes too much time to restart and sometimes it completely hangs on stop operation.

Question: how to clear/reset Windows SMB cache? Something like ipconfig /flushdns


share|improve this question

is it possible that they're being stored in the NetBios Resolver Cache?

To check try:

nbtstat -c

if that turns out to be the problem, the following will restart it.

nbtstat -R
share|improve this answer
Unfortunately it is not NetBios Resolver Cache issue – Roman Nov 3 '11 at 16:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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