Link to home
Create AccountLog in
Avatar of abaskett
abaskett

asked on

Get list of usernames connected to CAS Server

I have 4 CAS servers with the Client Access and Hub Transport Role installed. I have 2 Mailbox Servers in a DAG and am looking for a script that will show me which users are connected to a specific CAS server. I'm trying to retire 2 of my CAS servers.

I have a script that shows how many users are connected, I am trying to find out what the usersnames are. I've already changed the rpcclientaccess to my new server and need to manually change the users that are still connecting to the old Server.
Avatar of Manpreet SIngh Khatra
Manpreet SIngh Khatra
Flag of India image

Get-MailboxDatabase | Where {$_.RpcClientAccessServer -Like "CAS1"}

This will list any Database that is pointing to CAS1 ... meaning all users of this Database connect to CAS1 ..... likewise for other CAS servers can be checked as well

- Rancy
Or you can even run the below command and get all Database and CAS servers they work with

Get-MailboxDatabase | fl Name, RpcClientAccessServer

- Rancy
ASKER CERTIFIED SOLUTION
Avatar of Jamie McKillop
Jamie McKillop
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of winexc
winexc

Connected user listing

Get-LogonStatistics -Server "MBserver" | where {$_.clientname -eq "cas Server"}| ft username,servername,clientname

 
User counting

User connected via RPC

Get-Counter "\MSExchange RpcClientAccess\User Count" -ComputerName sr1,sr2,sr3 | ft

Users Connectecd Via OWA

 Get-Counter "\MSExchange OWA\Current Unique Users" -ComputerName sr1,sr2,sr3 | ft
Avatar of abaskett

ASKER

Thanks for the help. This script is exactly what I needed

Get-LogonStatistics -Server "mailbox Server" | where {$_.clientname -eq "cas Server"}| ft username,servername,clientname
I've requested that this question be closed as follows:

Accepted answer: 0 points for abaskett's comment #a38886428

for the following reason:

I got the solution from a link provided to me
Why are you trying to close the question without submitting points? You are using the solution I provided.

JJ