Jump to content
Welcome to our new Citrix community!
  • 0

Anyone have the SQL query to pul out user session info from the SQL monitoring DB?


Andy White1709154166

Question

Hello,

Does anyone know if it's possible to pull the flowing from the Monitoring DB for XenDesktop?  It's the current session info:

 

associatedusernames

LastConnectionTime

LastDeregistrationTime   

SessionClientAddress

SessionClientName

HostedMachineName

IPAddress

ApplicationsInUse

DesktopGroupName

PowerState

FaultState

 

I use this PS script to get the same info on the Delivery Controllers.

 

Get-BrokerMachine |
    # Where-Object associatedusernames | # probably better to filter here
    Select-Object @{n='Users'; e='associatedusernames'},
                  @{n='LogonTime'; e='LastConnectionTime'},
                  @{n='LastLogoffTime'; e='LastDeregistrationTime'},          
                  @{n='UserIP'; e='SessionClientAddress'},
                  @{n='UserDevice'; e='SessionClientName'},
                  @{n='HostedMachine'; e='HostedMachineName'},
                  @{n='VMIP'; e='IPAddress'},
                  @{n='Apps'; e='ApplicationsInUse'},
                  @{n='DG'; e='DesktopGroupName'},
                  SessionState, PowerState, FaultState |
    Where-Object Users |
    Sort-Object {$_.Users -join ' '} | # will there be more than one user?
    Format-Table -AutoSize

 

Thanks

 

Link to comment

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...