Important Notice: On February 29th, this community was put into read-only mode. All existing posts will remain but customers are unable to add new posts or comment on existing. Please feel to join our Community Discord for any questions and discussions.

Show Citrix assigned user ?

In our Citrix environment we are using persistent desktops but using generic naming structure for the machine names (ie. v-maching01-100 ). and then when the user first signs in it auto assigns them one of the machines that has not already been assigned out and that is their machine going forward. 

In Inventory i know it shows the Current User if a user is currently signed in.  Is there any way to show the assigned user that is set in Citrix Studio? (or even last user that signed in).   trying to see if i need to quickly inventory someone or deploy to a user to not have to cross reference back and forth from Citrix Studio and PDQ if possible at a quick glance

1

Comments

4 comments
Date Votes
  • Andew,

    I'm not aware of a method for doing this directly. I do know that most of the relevant Citrix info is stored in the registry at "HKLM\SOFTWARE\Citrix\ICA" so you can dig through there and see if it has what you want and then add the necessary values to your scanner.

    If you want the last user that signed in you could do that with a PowerShell scanner. I'm pretty sure that I got this from someone else here on the PDQ forums but I can't remember who so regrettably I can't credit them:

    --------------

    Name:

    PS - Logon History

    Script:
    Get-WinEvent -LogName 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational' -MaxEvents 100 -ErrorAction SilentlyContinue | Where {($_.Message -match "Session log") -and ($_.TimeCreated -gt (Get-Date).AddMonths(-12))} | Foreach-Object {
    [PSCustomObject]@{
    TimeStamp = $_.TimeCreated
    Message = $_.Message
    }
    }

    --------------

    Screenshot of result:

    1
  • thanks for the tip here! thats a cool one to add!  but the only way to find this out would be to drill down into a computer object to view that field right? was hoping to somehow show that user in a column in the main view if possible but maybe just not something thats doable right now

    1
  • Andrew,

    There is no way to show it in the main view as far as I know, because the main field can only show info from the Computers table. Even if you could display data from other tables there I'm not sure how it would work because they would have a one-to-many relationship-- it wouldn't be possible to show more than 1 login in a single column, since that PS scanner shows more than one login. Even if you were to limit it to 1 it would still assume a one-to-many relationship.

    You could just create a report containing the info you want and then run the report on demand when you need this info.

    1
  • understood! i figured it was a long shot but cant hurt to ask :)

    i did find this script that does a similar thing but cleans it up to just output the name and date so that is helpful

    https://github.com/pdq/PowerShell-Scanners/tree/master/PowerShell%20Scanners/User%20Last%20Logged%20On

     

    0