XenApp servers list for each Application with WorkerGroups management


We present you a Powershell command line to retrieve the server list of published application.

The specificity is that we will take the fact that applications can be published directly on servers and/or by a worker group.

The script will then get list of servers contained in the worker group:

[important]Get-XAApplicationReport * | select DisplayName,FolderPath,@{N=’ServerNames’;E={$_.serverNames+($_|?{$_.WorkerGroupNames}|%{Get-XAWorkerGroup $_.WorkerGroupNames}).ServerNames}} |convertto-csv >> export.csv[/important]

Thanks to Hypervisor.fr for the “OneLiner” form.

You can export a CSV file, here export.csv but you can change the ‘ConvertTo-Csv’ to ‘ConvertTo-Html’ and generate a usable HTML file.

As always feel free to comment 🙂



This command is ONLY functionnal if your worker group is populate with Server Farm ( not by OU or ServerGroup )

I will update the command in a second post.

Thanks to Glen for his help about this.



This is a Powershell command allow you to get all servers without regarding their type:

Get-XAWorkerGroupServer NAMEOFYOURWORKER |select servername

You can try command who is NOT finished because if you don’t have a publication publishing with a worker it return a $null

I will make an update (again )

Get-XAApplicationReport * | select DisplayName,FolderPath,@{N=’ServerNames’;E={$_.serverNames+($_|?{$_.WorkerGroupNames}|%{Get-XAWorkerGroup $_.WorkerGroupNames}).ServerNames}}




Skip to comment form

    • Glen on November 4, 2013 at 1:41 pm
    • Reply

    The script is not pulling the list of servers contained in the workergroups. any suggestions?

    • RIZ on June 9, 2014 at 4:52 pm
    • Reply

    Is there an updated script for OU or ServerGroup ?

    1. Yes i will update it very soon. Sorry for delay

        • RIZ on June 9, 2014 at 5:11 pm
        • Reply



    • M.LY on April 5, 2016 at 3:56 pm
    • Reply


    Very helpful .

    Thank you

Leave a Reply

Your email address will not be published.