Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

On my windows 2008 server I have a network share. I am logged on to the server with full administrator rights. I would like to know what users have active connections to that share.

How do I find that information?

share|improve this question
add comment

3 Answers

up vote 14 down vote accepted

There are two ways to go about this that I know if. One is unreliable, but probably good enough for most scenarios. One is extensive, but hard to implement at any scale that exceeds a handful of user connections.

The Kinda-Sorta Way: Select System Tools >> Shared Folders >> Open Files to see what files are open on the file server. From there you can correlate the user accounts that have open files to the shares that they are connected to.

However, that can be insufficient. Don't believe me? Go into Computer Management and select System Tools >> Shared Folders >> Sessions to see who is connected. Then look at the # open files column. Some sessions should have 0 open files. How do you know what share they are technically connected to? I'm glad you asked...

The Extensive but Hard to Scale Way: Perform net share [sharename] on each share in question to get a list of the users that are connected to it. In my testing, even users that have no open file are listed.

You can also utilize the Share and Storage Manager administrative tool in Server 2008 and beyond instead of Computer Management. Find the share in the list of shares, and then in the action pane to the right click "Manage Sessions." You will see a list of sessions including those that have zero open files.

But... but... I want to find a specific user without querying each share! If you have a specific user that you want to track down, it appears that your only means of finding that information is to query each share and eyeball it to find the user you want. And by eyeball I mean piping output to findstr or select-string. One could extrapolate the workflow to a script that enumerates all available shares, queries for connected users, and searches the output for the user in question, but that appears to be an exercise for the reader and not something that Microsoft has included as a native feature.

share|improve this answer
    
The info provided isn't sufficient in sessions or shares. It does not show specifically which users are connected to what share. I often see multiple connections to a network share, but If a user does not have a file open than I can't tell who is connected. I can only tell that there are a certain number of connections open. Not who's got the connection open. So Rick is just plain correct in this case. –  user175472 May 27 '13 at 18:25
    
I see the specific situation that could exist, where a user has an open session, but no open file, therefore you're not sure what specific share they have a ghostly session open to. In that scenario, I don't know how to tie 0-file sessions to the share that they are connected to. –  Wesley May 27 '13 at 20:06
    
Or, from a command line: NET SHARE <SHARENAME> –  Simon Catlin May 27 '13 at 20:11
    
@SimonCatlin Just tested this on a Server 2008 machine. I had one user with no open files but was listed as an open session. I had to query each of the shares on the server with net share sharename but eventually found the share that the session was connected to. I don't know if one can reverse the query and start with the user you're interested in and then track it to the share they have a connection to. Might need some custom PowerShelling. –  Wesley May 27 '13 at 20:19
add comment

Computer Manager isn't accessed the same way as in previous versions. You do get the "Server Manager" when you right click Computer and select "manage". So, instead of that, just type in compmgmt.msc in the "search programs and files" field under start.

share|improve this answer
add comment

I do not think the answer(s) provided actually answers the question. If you are using Windows Server 2008 (NOT R2), and you right-click Computer and select Manage, then confirming the UAC message, the Server Manager MMC launches. Under Server Manager are the following items: Roles, Features, Diagnostics, Configuration and Storage. None of those five items seems to have share name connections available as an option, which is what the original question was asking. The EDIT addition to the answer was more useful, mentioning the Share and Storage Manager, but still does not seem to provide the answer. It provides a comprehensive list of share names and properties, but active connections does not show up here either. With Windows Server 2003, there used to be an OS utility which displayed servers, shares and connections, but I have not found it yet on WS2008. There was a third party utility I used to use named Hyena from Adkins Resource, which I believe is still being marketed, which did an excellent job of displaying all manner of information about virtually every aspect of a server's condition.

share|improve this answer
2  
You're just plain wrong. I just fired up a 2008 R2 VM. When you open Computer Management (compmgmt.msc) and everything that Wesley describes is right there, just the same as 2003, including open files and active sessions. See this screenshot if you don't believe me. –  MDMarra Jan 31 '13 at 3:31
    
@Rick You're right, my answer wasn't completely correct. Two years later, and at the spurring of another member who called me out, I've re-done my answer to make it right. Thanks for keeping me sharp. =) –  Wesley May 27 '13 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.