How to find list of applications published on individual Citrix / VDA servers?


Ever wondered how to list all the published applications on individual Citrix servers. Below is a script that queries all the applications and lists them according to the delivery group and Servers they are published on. Just copy the below code and save as a Powershell file. I ran the below script in a XenApp 7.16 farm and it worked like a charm. This would work on other XenApp/CVAD 7.x versions too.

asnp citrix*
$apps = Get-BrokerApplication
foreach ($app in $apps){
Write-Output "`n`r"
Write-Output "Application name: $($app.name)"
$dgUIDs = $app.AssociatedDesktopGroupUids
foreach ($dgUID in $dgUIDs){
$VDAs = Get-BrokerDesktop -DesktopGroupUid $dgUID
Write-Output "`tDeliveryGroup:
$($VDA.DesktopGroupName)"
foreach ($VDA in $VDAs){
Write-Output "`t`tVDA: $($VDA.DNSName) Machine Catalog: $($VDA.CatalogName)"
}
}
}

The result will look like the following. The below is a sample of just a single application. The script lists all the applications published in the farm. So there you go!