SCRIPT: Show OWA Users

by Bharat Suneja

This is a modified script that shows current OWA/HTTP logons to the Store(s) on a given server(s). The script takes NetBIOS names of servers as command-line arguments (separated by spaces), uses the Exchange_Logon WMI class to connect to a server and retrieve list of users currently logged on.

Usage:

ShowHTTPLogons.vbs EXCH1 EXCH2 EXCH3

If Cscript is not your default scripting engine, it is advisable to add Cscript before the script name when you run this:

cscript SHOWHTTPLogons.vbs EXCH1 EXCH2 EXCH3

The script ignores non-HTTP logons, and displays the mailbox (display name), logged on user, and the Store name in a comma-separated format.

To dump output to a CSV file, simply add >MyOutputFileName.csv to the end of the command when running it, as shown here:

Cscript ShowHTTPLogons.vbs EXCH1 EXCH2 EXCH3 >MyOutputFileName.csv

The script does not display logons by the System account (NT AUTHORITY\SYSTEM), but these are counted and displayed as a summary, in addition to the number of actual HTTP logons by users. Please note, a single OWA session can have multiple HTTP logons on the Store, so this is by no means a way to calculate the actual number of users currently logged on using OWA. You will see repeated entries for mailboxes because of this (… it’s not a very tidy script, but written in a hurry…. hopefully I will be able to fix that at a later date).

Note: You will need to extract the file and rename it with a VBS extension.

{ 4 comments… read them below or add one }

Anonymous December 8, 2006 at 7:24 am

Hello,

Is it available for Front-End servers ?

Thx

Remy

Reply

Anonymous November 20, 2007 at 4:17 am

Hello

Your script was very good, but I do not find the users connected on the Front-end, It is better to test the load balancing. Could try to make a script for that

Thanks

Denis

Reply

Anonymous February 7, 2008 at 2:50 am

Your script was very good, but it works only on a machine in a same domain (same credential). It is possible to do a version with an another credentials

Thanks

Reply

Vinod Babu November 19, 2010 at 5:25 am

Can you give me a script or any other option to filter the users connected through IMAP from the exchange 2007 server?…

Reply

Leave a Comment

Previous post:

Next post: