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