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