Determine the Number of Active Users on Exchange Servers with PowerShell

It’s always good to know how many users might be affected by an taking a server down. The following PowerShell function will grab performance counter data from each server to determine the number of active OWA and RPC connections:

Just add the function to your shell session and when you run it, specify one or more server names using the -ComputerName parameter:
The function is also written to support pipeline input, so you can pipe the Get-ClientAccessServer cmdlet to it as well:
It can take a few minutes before the values are updated as clients connect or disconnect.

Written by Misha Hanin

Trusted Business & Technology Advisor, Solutions Managing Director & Senior Solutions Architect at iRangers International Inc. with more than 25 years of experience in the field of information technology, infrastructure analysis and design, implementing innovative and leading technologies for International companies around the globe in public and private sectors.

Over the years I was able to develop very strong technical and engineering skills which helped me to earn trusted advisor status with our clients. As one of the nearly 500 trained Microsoft Certified Masters (MCM) in The World (during 10 years existence of MCM program, just about 500 people in The World participated in this very intensive training), I have a winning track record in building and bringing projects to operational and measurable success.

I am honored to have been awarded Microsoft Most Valuable Professional (MVP). This award is given to "exceptional, independent community leaders who share their passion, technical expertise, and real-world knowledge of Microsoft products with others."