Display hostname to XenDesktop 5.6 users

By default, XenDesktop 5.6 uses the Desktop Group display name to display to the end user. This is intended so that when you are using pooled desktop, the user can randomly get a VDI. However, if you are using XenDesktop to broker to dedicated virtual machines, it may be helpful to display the hostname to the user rather than the Desktop Group name. I personally prefer to have all of these computers in one desktop group. Here is a script to set this display property for all the computers in that desktop group:

$adminaddress = "your XenDesktop controller" #xenDesktop controller
$domainname = "your domain's NetBIOS name" #domain netbios name

if ( (Get-PSSnapin -Name citrix* -ErrorAction SilentlyContinue) -eq $null )
{
    Add-PsSnapin citrix*
}
$DesktopGroup = read-host "Desktop Group Name"

Get-BrokerDesktopGroup -adminAddress $adminaddress -Name $DesktopGroup | ForEach{Get-BrokerPrivateDesktop -DesktopGroupUID $_.uid} | Where-Object -Property MachineName -ne "" | ForEach{Set-BrokerPrivateDesktop -adminAddress $adminaddress -MachineName $_.MachineName -PublishedName ($_.MachineName -replace "$domainname\\", "")}

-Matthew DeBoer

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s