Automation

 View Only
  • 1.  How to keep track of who is using what VM?

    Posted Jun 22, 2016 06:28 PM

    We have quite a lot of VMs on our esx servers and a lot of people using them. Because of the nature of our work, the majority are left idle "just in case". If we need to shut one down for any reason, we need to open it up in a console and sit and stare at the screen to see if any windows open or if the cursor moves. What I'm looking to do is figure out a way to see what user is using what vm (in other words to see who has what VM open in a console doing/about to do something). 

    Any help, links, articles, scripts or hints would be greatly appreciated.



  • 2.  RE: How to keep track of who is using what VM?
    Best Answer

    Posted Jun 23, 2016 04:43 AM

    If you only want to see who connected to a console of a VM, you could try

    Get-VIEvent -Start (Get-Date).AddDays(-7) -MaxSamples ([int]::MaxValue) |

    where{$_ -is [VMware.Vim.VmRemoteConsoleConnectedEvent]} |

    Select CreatedTime,UserName,@{N='VM';E={$_.Vm.Name}}



  • 3.  RE: How to keep track of who is using what VM?

    Posted Jun 23, 2016 01:37 PM

    Perfect! Thank you so much! The only thing missing is that it only show who is on a vSphere console. Do you know of any functionality that would also show us users using workstation or fusion?



  • 4.  RE: How to keep track of who is using what VM?

    Posted Jun 23, 2016 04:05 PM

    I'm afraid not.

    I think you better ask that part of the question in the Workstation or Fusion Community.