A while ago I was working on a very very old VMware View environment. Yes, you’ve read this correctly, a VMware View environment. This is even from before the product was officially called “VMware Horizon View” back in 2015.

So, the subject I was working on for the customer, but also for us since we manage it, was that we needed to know who got what session at what time of the day, and how many users logged in daily. This information would also be used for troubleshooting, since the environment wasn’t that up to date anymore, as you can probably imagine. 

So, how did we tackle this? Well the VMware View Administrator console was not really up for the task, since you can only check “Current” or “Highest” number of sessions, but nothing with names, timestamps or anything like that.

VMware View Administrator console

What else can we use to get this information? Well, the only thing that I actually found that worked with this ancient environment were my trusted good ol’ PowerCLI modules! The VMware View PowerCLI plugin (VMware.View.Broker) for that matter. These are HARD to find for this old environment! I actually couldn’t find any downloads anymore at all, anywhere! Luckily the plugin was still inside the installation folder on the VMware View Connection Server. I did manage to save the add-snapin.ps1 and uninstall-snapin.ps1 files for this module. But if you don’t have the installation files that include the “.dll’s” you need, you don’t have any use for this (if you do want these, just let me know!).

Let’s suppose you have the View PowerCLI modules installed, like me, how do we get the information we need? Well let’s first have a look at the commands we have available in the plugin. You can do this by executing the following piece of code:

Alright awesome! So it turns out that a lot of this actually matched up with the Horizon View PowerCLI 7 cmdlet Reference! But, back to the task at hand. Turns out there is actually only one command that was useful for me.

The rest wasn’t that useful to use for this task. The “Get-EventReport” cmdlet can give you quit some information, if you know how to use it. Before we can use this command it is useful to see what the command can deliver, you can check this by executing:

This tells us that we can get information from four categories. To get the same information that we can see in the VMware View Administrator console just execute the following piece of code:

Now the rest is easy, we will narrow this down to a specific number of days, because the rest isn’t needed for our use case. By doing this you will end up with the following piece of code:

The next thing we wanted to know was what user logged in at what time. This was for troubleshooting purposes because the VMware View Administrator console isn’t the fastest to display events, especially the older version of View. We started looking at the same command again and used the “user_events” ViewName type category. This resulted in many events. To sort through these it’s useful to check what type of events there are:

Turns out, only two are available. This makes it easy to find out whether a user logged in succesfully or not. Just run the below command to find out when a user logged in.

So now that we have the information we need, we need to find a way to schedule this so that we can use this information, anytime we need it. Fortunately, scheduling PowerShell code is very easy. Just create a “.ps1” file and schedule it to run in Windows Task Manager. I ended up with the following script, which satisfied our needs.

So there you have it. Even the ancient VMware View environment I was working on had ways to find our information that the VMware View Administrator console didn’t have. Hope you found this post useful!


  1. Hi Bryan,
    Thank you for help about this topic. I found it very useful
    How can add also add the Pool_Id of the user session, Please

    time userdisplayname Pool_Id
    —- ————— —————-
    2020-02-08 04:55:40.793 vcloudvision.com\user01 Desktop Name

    Thank you in advance for your help

    Mohamed K,
    1. Hi Mohamed,

      Good to hear that you liked the script! I am honestly not sure if that is possible since the Pool_ID is not a property within the user_events EventReport. So I am guessing you will have to correlate that data from another call and join it into the data from this script. I am currently no longer able to test this on a Horizon View 5.x environment unfortunately. So testing this for you will be difficult for now.

Leave a Reply

Your email address will not be published. Required fields are marked *