#PSTip How to get the number of IIS current client connections

Note: This tip requires PowerShell 2.0 or above.

Using the Get-Counter cmdlet and the Web Service Current Connections performance counter, you can get the amount of current connections to an IIS server or to one of its web sites. This counter is extremely useful in load balanced environments where you want to make sure that connections are evenly balanced across a group of IIS servers.

The following command gets the total number of connections for the server:

This example gets the number of connections for a specified website of three front end servers of a SharePoint farm:

Filed in: Columns, Tips and Tricks Tags: , ,
© 2018 PowerShell Magazine. All rights reserved. XHTML / CSS Valid.
Proudly designed by Theme Junkie.
%d bloggers like this: