This post provides several methods of enumerating sessions, connections and open files on a local or remote machine. Apart from the Powershell script that calls NetFileEnum there's nothing particularly new about this post, but I thought it was worth putting several different methods in one place.
This information is useful for gauging the use of file servers in particular, including the detail of which users are connected and what files they have locked.
Querying information against a single computer:
Run 'compmgmt.msc /computer=%server%' and look in 'Shared Folders' for Shares, Sessions and 'Open Files'
Run 'procexp.exe' (Process Explorer - SysInternals) on the machine and view the handles of the server service
psexec \\%server% net file
psloggedon \\server
psexec \\%server% -c handle.exe
Sat Jun 20, 2015 4:36 pm
emma
Joined: 12 Dec 2013 Posts: 78
Although it covered most of code that is needed and quite helpful for those who need this solution.Querying information against a single computer is easy but when it comes to multiple then you need to pay attention.
digital signatures
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum