As in my previous post we are querying the Citrix monitordata tables in SQL instead of doing web queries against ODATA because it is super fast.
The script needs to run as a user who has at least read rights to the database. Just like the original it will query the monitordata tables to gather the information, but I think I have improved on the queries a bit. Also, just like the original it gets a lot more information than what is actually needed, so the queries can be used again for other information (logon duration reporting, accessing outside vs inside report, client version reports, etc.). Feel free to edit and use this script as you see fit.
Here is the updated script! Pay attention to anything marked with multiple hashes (####). It is referencing something you need to change for your environment (ie: sql server name), or items of note.
Here is an example of the updated report.