9 Replies Latest reply on Jul 5, 2020 7:21 PM by vols11

    HTML Access Report

    HainesFGL Lurker

      I need  to find which users are connecting using HTML access (using web browser).  I believe it's always "Blast" using SSL/443 tunnel.  I'm pretty sure it's logged on security server or connection server.  Looking for the easiest way to extract it and create a report.  For example, from 6/1/20 - 6/30/20 These 458 users connected to vdi using HTML access.

        • 1. Re: HTML Access Report
          RoderikdeBlock Hot Shot

          You could give it a try using PowerCLI:

           

          Connect-HVServer -Server <Your HV Server>
          
          $ViewAPI = $global:DefaultHVServers[0].ExtensionData
          $query_service = New-Object "Vmware.Hv.QueryServiceService"
          $query = New-Object "Vmware.Hv.QueryDefinition"
          $query.queryEntityType = 'SessionLocalSummaryView'
          $Sessions = $query_service.QueryService_Query($ViewAPI,$query)
          
          $Sessions.Results.Namesdata
          

           

          This will give you the following output.

           

           

          • 2. Re: HTML Access Report
            HainesFGL Lurker

            Hi Roderik, This is great stuff and working very well I'm including output from the PowerCli below.  My question is where exactly is this coming from?  Right now I'm pointing to our security server and I'm getting good data output <below>.  Is there a way to include the date and time the session started?

             

            Connect-HVServer : There was no endpoint listening at https://securityserver.domain.com/view-vlsi/sdk that could accept the message. This is often caused by an

            incorrect address or SOAP action. See InnerException, if present, for more details.

            At C:\Documents\Scripts\HorizonClientConnectionType.ps1:1 char:1

            + Connect-HVServer -Server securitysecury.domain.com

            + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                + CategoryInfo          : NotSpecified: (:) [Connect-HVServer], Exception

                + FullyQualifiedErrorId : System.Exception,VMware.VimAutomation.HorizonView.Commands.Cmdlets.ConnectHVServer

             

             

            One line of sample output using Export-CSV

             

            "domain.com\\TUser","C1-COMPUTER-254","c1-computer-254.domain.com","7.8.0","c1_pool_o64","Windows 10","AUTOMATED","VIEW_COMPOSER",,"d17c390e-f2d3-6530-ca91-3a57a264bbae","htmlaccess","10.10.10.32","10-10-10-32-Edge","5.0.0","view.domain.com","10.10.10.230","External"

             

            Thank you for your help and suggestion on this.  Very helpful.

            • 3. Re: HTML Access Report
              Mickeybyte Hot Shot

              Hi,

               

              The connect-HVServer should connect to a Horizon Connection server. I don't think a security server will work.

               

              Regards,

              Michiel

              • 4. Re: HTML Access Report
                HainesFGL Lurker

                What is the source of the data output?  I can't tell from the PowerCli...  How can I include the session date & time?

                 

                Odd thing is that I coonected to security server and got the error above, then several hundred lines of output.

                • 5. Re: HTML Access Report
                  Shreyskar Expert
                  VMware Employees

                  You can pull this information from horizon helpdesk plugin Or through DEM script .Please check Re: what OS is connecting to my VDI environment?

                  • 6. Re: HTML Access Report
                    RoderikdeBlock Hot Shot

                    This will include date and time and gives the output as shown.

                     

                     

                    Connect-HVServer -Server <Your HV Server>
                    
                    
                    $ViewAPI = $global:DefaultHVServers[0].ExtensionData
                    $query_service = New-Object "Vmware.Hv.QueryServiceService"
                    $query = New-Object "Vmware.Hv.QueryDefinition"
                    $query.queryEntityType = 'SessionLocalSummaryView'
                    $Sessions = $query_service.QueryService_Query($ViewAPI,$query)
                    
                    
                    $results = $Sessions.Results | ? {$_.Namesdata.ClientType -like "htmlaccess"} 
                    
                    foreach ($session in $results)
                    {$session | select @{N='UserName';E={$Session.Namesdata.UserName}},@{N='ClientType';E={$Session.Namesdata.ClientType}},@{N='StartTime';E={$Session.SessionData.StartTime}} }
                    

                     

                     

                    2020-06-30_08-13-05.png

                    • 7. Re: HTML Access Report
                      HainesFGL Lurker

                      Roderik, This is great!  Thank you!  Using PowerCli for Horizon has been very challenging considering there are only just a few cmdlets.  I'm about to try your latest update to the script.  I'm still curious where this data is being pulled from?  Is it stored in the ADAM DB?  Ideally, in addition to including the date/timestamp, I would like to be able to query this data from a specific time period.  For example from 6/25/20 - 6/30/20.  Is this history stored somewhere?

                       

                      Thank you again for your help on this!  Great stuff.

                      • 8. Re: HTML Access Report
                        RoderikdeBlock Hot Shot

                        Unfortunately this is realtime data. You can create scheduled tasks to collect and filter the data or could go for the suggestions of Shreyskar.

                        • 9. Re: HTML Access Report
                          vols11 Novice

                          Hi Haines

                           

                          I see that your users connect to your Horizon environment through HTML. We are also considering giving this option to our users and would appreciate your advise on this in terms of support and user feedback