Suppose I have following entry in
188.8.131.52 test # foo machine
I start script that every second call
ping test and cat
IP: 184.108.40.206; machine name: foo
Then I change
hosts.cfg to following:
220.127.116.11 test # bar machine
Now script output is following:
IP: 18.104.22.168; machine name: foo # bar is expected!
\\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