I'am just looking for a way to view the currently connected peers to a Windows SMB share?
For example: I want now to see who is connected to the Windows server and is he doing any file transfers?
From a command prompt run
net session. That will show you session connection information. It will not show you who is actively transferring data. For that you'll need to run a packet capture program on the server.
You could also run the MMC console relative to the Windows OS and Role for File sharing (Share and Storage Management in Windows Server 2008 R2 for instance). For instance, On Windows Server 2008 and 2008 R2 you could open the Computer Management console and navigate to
File Services|Share and Storage Management and click the
Manage Sessions item or the
Manage Open Files item in the Action Pane.
There are two basic ways to see which files on SMB shares are being accessed:
Open Files object under
Computer Management (
Shared Folders =>
Any file that is currently open should be considered to be potentially in use, either being read, written to, or simply held open by a process on a client computer.
These will also show you which user (or computer, if there's no user associated with it) owns the handle. Otherwise, see joeqwerty's answer for how to grab just a list of active SMB sessions/users.