For viewing shares, sessions and open files, you can use the FsMgmt.msc management console plugin (on the same page, Petri also has some interesting information on the NTLANUI.DLL)
You can do the same from the command line, using the NET command.
Somehow, can remember the NET SHARE and NET SESSION command, but I always forget about the NET FILE command.
Luckily, SS64 has documentation on the NET SHARE/VIEW/SESSION/FILE/USE commands on one page.
Here is what they have on NET FILE:
Display all the open shared files on a server and the lock-id
NET FILE
Close a shared file (disconnect other users and remove file locks)
NET FILE id /CLOSE
Two tiny notes:
- for NET FILE and NET SHARE you need to be Administrator (and run them from an elevated command prompt when running on Windows Vista and up).
- you can pluralize these commands as well:
– NET SHARES
– NET SESSIONS
– NET FILES
They work just like the singular version.
NET USES and NET VIEWS won’t work though.
–jeroen
via: net share / net view / net session / net file / net use.