With XenDesktop 7.12 its possible to tag your Published Applications and assign them to an application group. With this feature we get back the control on which server the user session will be established. Many of XenApp IMA administrators have been missing this feature. If you only have a few published apps and one DeliveryGroup its not a big deal to add them to an created application group but what if you only want to add the apps from Delivery Group “Sales”? Its very annoying to select all the applications and assign them to the app group. Here is a PowerShell script to save you some work 😉
Detailed information about tagging is available from the blog post of Martin Zugec.
How to Assign Applications to Specific Servers in XenApp 7
MoveAppstoApplicationGroup_v1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<# DESCRIPTION This script will import all Published Applications from a specific Delivery Group to an Application Group. Author: Julian Mooren Creation Date: 25.05.2017 Purpose/Change: Initial script development #> Write-Host "Importing the Citrix Modules..." asnp Citrix* $controller = Read-Host -Prompt "Please enter FQDN of the XDC. Example 'xdc01.domain.local'" Write-Host "Which Delivery Group should be added?" $Expand = Read-Host -Prompt "Name of the Delivery Group. Example 'XenApp7_PROD'" $ExpandDG = Get-BrokerDesktopGroup -AdminAddress $controller | Where {$_.Name -eq $Expand} Write-Host "Which Application Group should be added?" $Import = Read-Host -Prompt "Name of the Application Group. Example: 'AppGroup_V18'" $ImportAG = Get-BrokerApplicationGroup -AdminAddress $controller | Where {$_.Name -eq $Import} $PublishedApps = Get-BrokerApplication -AdminAddress $controller | Where {$_.AllAssociatedDesktopGroupUids -like $ExpandDG.UiD} Foreach($app in $PublishedApps) { Write-Host ” –” $app.Name "will be added to " $ImportAG.Name Add-BrokerApplication -AdminAddress $controller -ApplicationGroup $ImportAG.Uid -InputObject @($app.Uid) } |