View connection to shares on a Server


We have several MS Win 2008 File Servers at several locations with lots of windows shares, I am busy with a clean up and have the following issue with getting rid of existing visible shares:

The Servers would have several visible shares, I am adding a 2nd hidden share to all those folder locations and migrating the drive mappings to map to the hidden shares, once all users map to the hidden shares then I remove the original visible share.

I the process I pick up that when wanting to delete the original share it tells me that x amout of users are still connected to the share. How do I determine which users are specifically connected to that visible share?

When using fsmgmt.msc and Share and Storage Management on the Server one can go to "sessions" and "open folders and files" where you can see which user has a connection to the physical folder or files, but it does not show you to which share the user is connected.


- On the Server1 there is a share called "users" that points to d:\data\users\ to which all users connect via a mapped drive (some mapped via AD GPO, some manual mappings on the PCs)

- I now go and add a 2nd share to d:\data\users\ and call it "users$" and go and amend the AD GPO to map users to the "users$" share.

- In a week's time I go back to the Server and want to delete the original "users" share and it tells me "x amount of users are still connected to the "users" share with x amount of files open, do you really want to delete the share?".

- If I now go to fsmgmt.msc or Share and Storage Management it will show me that Users 1 to 20 has a session or files open to d:\data\users (the physical UNC path) so I cannot see which users are connected to the "users" share and which are connected to the "users$" share in order to send an Administrator to go and fix their mapping to map to the "users$" share.

Thanks for help with this.

Reinhard RensburgInfrastructure ManagerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ben HartCommented:
I do not know of anyway to view what you are wanting.  I'd think, logically, that it'd probably require a 3rd party tool.  But which one I can't guess.  Sorry, I'm no help but I would be interested to know the outcome.
Ben HartCommented:
Wait, wait.. what about 'net share [sharename]'?  That should show you users that have sessions to a specific share name rather than the folder...

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Reinhard RensburgInfrastructure ManagerAuthor Commented:
Hi Ben,

Thanks for the reply, I do have one manual way of checking, but it takes time to do it this way, in the logon script I run the "net use" command and write the output to \\<fileserver>\audit\%USERNAME% so I can open these files and see which drive mappings the users got at their last login (a text file per username) which is nice, but this is not practical if there are 300 users on a site and one has to go through 300 text files to check who mapped to the visible share, but at least it's a way if one has a lot of time on hand :)

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

Reinhard RensburgInfrastructure ManagerAuthor Commented:
Hi Ben, I just saw you last post about "net share" - I will give it a try quickly and revert back thanks :)
Reinhard RensburgInfrastructure ManagerAuthor Commented:
Ben, you are the man!

Thanks, that is perfect, it works like a bomb! Screen shot attached.

Thank you so much, very practical and simple solution to my problem.

Ben HartCommented:
Rock On!  Glad to hear it worked for you dude.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2008

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.