VMware: List Users who have a active Console Connection to a virtual machine

Hi,

there are multiple active console connections and you want to know who are currently connected?

This cannot be shown directly, you have to go to the Tasks/Events tab of a virtual maschine, change to the Event View and look for an Event “Remote Console connected”.

vSphere console events
vSphere console events

Or use PowerCli to list all Remote console connections from a virtual machine

Get-VIEvent (Get-VM "YourVirtualMachine") | where-object {$_.FullFormattedMessage -eq "event.VmRemoteConsoleConnectedEvent.fullFormat"} | select-object CreatedTime,UserName

CreatedTime                                                       UserName
-----------                                                       --------
25.11.2014 12:14:39                                               VSPHERE\VMuser1
25.11.2014 12:14:23                                               VSPHERE\VMuser2
12.11.2014 11:26:28                                               VSPHERE\VMuser1
12.11.2014 11:26:25                                               VSPHERE\VMuser2

Michael

One thought on “VMware: List Users who have a active Console Connection to a virtual machine”

  1. Hi,

    first of all thank you for your blog post, this looks like exactly what I need.
    We also have a few VMs that we sometimes accidentally use with multiple persons at the same time.

    However, neither I nor the ESX admin see those VmRemoteConsoleConnectedEvents.
    We looked through the vsphere webclient interface for more than half an hour to find some way to configure the logging system to maybe enable those events, no success.
    Do you have any idea where to look for that?
    Can you confirm that your script still works with a later version like 6.5?
    Maybe those events got removed in a more recent version of the software.

Leave a Reply