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