Find the Number of Users Currently Connected to SharePoint Site

Had to perform an unplanned IIS Reset to fix an issue in production SharePoint Farm. But executing IISReset breaks ongoing user sessions and give “Service Unavailable” error message, isn’t it? Wouldn’t it be a good idea to find the No. of users currently connected with the SharePoint site and do the IISReset for a minimal impact? Sure!

How to find how many users connected with SharePoint sites? Use Performance Monitor!

  • Go to Start >> Run >> Type “Perfmon”, to fire up Performance Monitor.
  • Click on “Performance Monitor” , Right click “Add Counters” in Graph windowsharepoint how many users connected
  • Under the available Counters, Pick “Web Service” expand the node and select “Current Connections”
  • Under “Instances of Selected object” You can either select “Total” or pick a particular web applicationFind the number of users Currently Connected to SharePoint Site
  • Click on Add button to add the selected counter, and click “OK” button

Now the graph will show how many users connected to your SharePoint Site(s).
sharepoint number of users connected
Please not, this gives only the no of user sessions currently ongoing. But not the one already completed (Doesn’t count the users already opened the site and left it idle!) There are possibilities that users may hit the SharePoint URL meanwhile and receive “Service Unavailable” message since IIS is reset!

PowerShell to get the current number of users connected:

We can also use PowerShell to get the number of users connected:

$servername = "Cres-SPWFE01"
Get-Counter -Counter 'web service(_total)\current connections' -ComputerName $servername

This gets you the number of users connected with all websites on the server. Let’s get the number of users connected to a particular website:

$servername = "Cres-SPWFE01, Cres-SPWFE02, Cres-SPWFE03"
$WebSiteName="Intranet Portal" #Web site name in IIS
Get-Counter -Counter "web service($WebSiteName)\current connections" -ComputerName $ServerNames

Salaudeen Rajack

Salaudeen Rajack - Information Technology Expert with Two-decades of hands-on experience, specializing in SharePoint, PowerShell, Microsoft 365, and related products. He has held various positions including SharePoint Architect, Administrator, Developer and consultant, has helped many organizations to implement and optimize SharePoint solutions. Known for his deep technical expertise, He's passionate about sharing the knowledge and insights to help others, through the real-world articles!

Leave a Reply

Your email address will not be published. Required fields are marked *