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!

Extract/List the Applications from a Delivery Group – XenApp/XenDesktop 7.x


This is going to be a quick post to explain how you can extract all the AD groups that are currently being used for the various applications that you serve in XenApp/XenDesktop 7.x farms. This came very handy when I had a large number of applications that need to be migrated to a new XenApp 7.15 LTSR farm. This will also come very handy for documentation purposes.

First up, you will need to find the Delivery Group Name UUID that you need to extract the details from. If you have multiple delivery groups, you will need to find the UUIDs for all the Delivery groups.

To find the UUID, run the command below in a PowerShell window in admin mode

asnp Citrix*
Get-BrokerDesktopGroup

This returns the details of all the Delivery groups in the XenApp farm.

Take a note of the UUID value

Now run the below to show the application names and the assigned user AD groups

Get-BrokerApplication -AssociatedDesktopGroupUUID 918bd477-6848-4d27-b98d-28296e78d6a1 | select ApplicationName,AssociatedUserFullNames
27

You can get all sorts of results by changing the filters. I have listed all the available Application filters from XenApp 7.16 below

AdminFolderName
AdminFolderUid
AllAssociatedDesktopGroupUUIDs
AllAssociatedDesktopGroupUids
ApplicationName
ApplicationType
AssociatedApplicationGroupUUIDs
AssociatedApplicationGroupUids
AssociatedDesktopGroupPriorities
AssociatedDesktopGroupUUIDs
AssociatedDesktopGroupUids
AssociatedUserFullNames
AssociatedUserNames
AssociatedUserUPNs
BrowserName
ClientFolder
CommandLineArguments
CommandLineExecutable
ConfigurationSlotUids
CpuPriorityLevel
Description
Enabled
HomeZoneName
HomeZoneOnly
HomeZoneUid
IconFromClient
IconUid
IgnoreUserHomeZone
MachineConfigurationNames
MachineConfigurationUids
MaxPerUserInstances
MaxTotalInstances
MetadataKeys
MetadataMap
Name
PublishedName
SecureCmdLineArgumentsEnabled
ShortcutAddedToDesktop
ShortcutAddedToStartMenu
StartMenuFolder
Tags
UUID
Uid
UserFilterEnabled
Visible
WaitForPrinterCreation
WorkingDirectory

I wanted to get a bit more information so I ran the below to get what I need.

PS C:\Temp\Lal> Get-BrokerApplication -AssociatedDesktopGroupUUID d7dd0daa-6798-4a95-9264-33e2ed15ac2e | select ApplicationName, PublishedName, CommandLineExecutable, CommandLineArguments, WorkingDirectory, AssociatedUserFullNames

Or simply run the below which shows the various filters that you can use for a given application

Get-BrokerApplication

That’s it for now. I hope this helps someone with their PowerShell journey in Citrix

XenApp & XenDesktop 7.x – Error “Incompatible Settings on SDK” on Delivery Groups


My colleague came across this error message while working with a customer where he had to prevent Citrix Desktops from being shown to users if they are in a particular AD group. He didn’t recall what he did wrong but he ended up with Desktops doubling up for a standard user who isn’t a member of exclusion group.

Inspecting the delivery group, he noticed Desktops per user settings  under User Settings has a different value “Incompatible Settings on SDK

desktopsperuser

Querying the Delivery group

Get-BrokerEntitlementPolicyRule

Going through the results, there is an additional desktop without any filtering applied. The fix is to remove the additional desktop. In his case, it was named was “Desktop_2”

Remove-BrokerEntitlementPolicyRule -Name "Desktop_2"

Running the get command shows the below results.. the second desktop is gone!!!

startbutton

Hopefully this helps someone.

Running a QFARM command in XenApp 7.x


As most of you are aware by now, Qfarm command doesn’t run anymore in XenApp 7.x as it is a part of old IMA architecture.

With FMA, there are several ways to check the Server load, the easiest being using Citrix Studio and checking Load Index.

However, there is another method to check the load from using a PowerShell window and it is as below.

asnp citrix*
Get-BrokerMachine –Filter ‘SessionSupport –eq “MultiSession”’ –Property @(‘DNSName’,’LoadIndex’)

qfarm1

if you need more details, you could add more parameters in your command line as below

Get-BrokerMachine –Filter ‘SessionSupport –eq “MultiSession”’ –Property @(‘DNSName’,'WindowsConnectionSetting','SessionCount',’LoadIndex’)

The result from running the above command is as follows

qfarm2

Hope it’s useful for someone out there!!!

 

 

Power Management of XenDesktop 7.x Delivery Groups – Prevent workloads from powering off when not in use


There are many a times when you would want to prevent XenDesktop/XenApp 7.x power management from powering off virtual machines in the catalog. If you ever wondered how to do it, here are the steps

Open the PowerShell in administrative mode on the Controller server

asnp citrix*
Set-BrokerDesktopGroup "Delivery group Name" -AutomaticPowerOnForAssignedDuringPeak $True

if the above doesnt fix it, then run the below command as well which will ensure that all the VMs are ready for connections all the time

Set-BrokerDesktopGroup "<Delivery group Name>" -PeakBufferSizePercent 100 -OffPeakBufferSizePercent -100