As part of a Microsoft Exchange 2010 migration, we are moving users from one CAS (Client Access Server) that is being retired to another which is replacing it.
In an ideal world we would have implemented a CAS array, but time and other factors have prevented us from setting this up straight away so we are moving users from one CAS server to another.
So we can see how our progress is going, and so we can confirm there are no users on the old CAS server before we decomission it, it would be useful to query the CAS servers to see how many connections are being made to them.
There isn’t an actual PowerShell command to do this, but we are able to use the Get-Counter command to query a couple of Exchange Performance Monitor counters.
I saved the two lines below in a PowerShell script called get-casconnections.ps1.
Get-Counter “MSExchange RpcClientAccessUser Count” -ComputerName casserver1, casserver2 | ft
Get-Counter “MSExchange OWACurrent Unique Users” -ComputerName casserver1, casserver2 |ft
To be able to run it you may need to modify the Execution Policy, by default it is set to restricted and therefore won’t run scripts you have created.
To change your execution policy run the command:
Now onto running the Get-CASconnections.ps1 command.
Now if only I can create a script to identify the CAS connections to user accounts….