Find out which users have a console connection with OpsMgr

Sometimes it would be useful to find out which users have a console connection. Although not exactly, it is possible to find out which users are connected to the OpsMgr SDK Service. This is not always the same as a console connection because people can also be connected to the SDK through the Operations Manager Shell and services that use a connector such as SCVMM also use an SDK connection. It is possible nonetheless to get a reasonable impression of who is logged on through a console connection, and how many, by executing the following powershell commands:

  • Get-ManagementGroupConnection | foreach-object {$_.ManagementGroup.getConnectedUserNames()}
  • Get-ManagementGroupConnection | foreach-object {$_.ManagementGroup.getConnectedUserNames()} | measure-object

The first will retrieve a user listing (duplicates will not be filtered out), and the second will give you the number of users.