Skip to main content

Posts

Showing posts from January, 2011

Get User connections to a share

I have always put this one in the "I'll get round to it" pile.  Today, I have finally got round to it! You can quite easily determine who is connected to a Windows Server by going to Computer Manager and choosing shared folders - sessions.  You can also see how many people are connected to a share by going to Computer Manager and choosing shared folders - shares.  What i want to know is WHO is connected to each share.  I have had quite a big reason to do this recently and so I have finally got round to creating a powershell 2 function to do precicely that! It will accept 2 parameters, a servername and an optional sharename to return only the connections from a particular share.  Regards Adam function get-shareConnection { #generate the help file <# .SYNOPSIS Get the current users that are connected to shares on a server .DESCRIPTION Get the current users that are connected to shares on a server. This can be filtered to a specific share. .NOTES Function Name