PowerShell “one-liners” for Citrix XenApp 6.x

PowerShell is a powerful scripting language. You can accomplish quite a lot with a single, but sometimes long, line of code. Here are a couple of my personal favorite "one liners" for Citrix XenApp.

In order to run these commands simply open a PowerShell window, execute the command add-pssnapin citrix* (to load the Citrix plug-ins) and copy and execute the line of code.

List all published applications in the farm (including the client folder name)

List all applications in the farm (display name only)

Count all currently logged on users

Did you ever want to know how many unique users are currently logged on to your farm? Here is your chance:

List all currently logged on users

The following command line shows you which users are currently logged on to your farm.

Determine how many applications are published in more than two subfolders

Determine how many applications are published in more than two subfolders

List all published applications which start a script (in either VBScript or PowerShell)

This line of code checks the command line of each published application in the farm for the keywords "cscript, "wscript", "powershell", "vbs", "ps1" and "hta". It than lists each application's display name including client folder name (if applicable).

Share this post:
Dennis Span on EmailDennis Span on LinkedinDennis Span on Twitter
Dennis Span
Dennis Span
Dennis Span works as a Lead Sales Engineer at Citrix in Vienna, Austria. He holds multiple certifications such as CCE-V, CCIA and CCEA. In 2017, Dennis became a Citrix Technology Advocate (CTA). In 2019, he became a Citrix Technology Professional (CTP). Besides his interest in virtualization technologies and blogging, he loves spending time with his family as well as snowboarding, playing basketball and rowing. He is fluent in Dutch, English, German and Slovak and speaks some Spanish.

2 thoughts on “PowerShell “one-liners” for Citrix XenApp 6.x

    • Hi Liam,

      Interesting question. You need a history log to retrieve this kind of information, for example within EdgeSight or a third-party monitoring product. Without historical information, it will not be possible to get the information you want. Another option is to write a logon script that enters logon information in a database, or even a CSV file, that you can access anytime to see the user’s last Citrix session. I hope that I understood your question correctly.

Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.