I received an interesting request from an awesome colleague in the midst of this VDI deployment we’re doing to one of our offices. His question was to see if it’s possible to individually name each of the display names of the desktops that show up in Storefront (or web interface if that’s what you’re using). If you didn’t know, by default they take on the display name defined in it’s delivery group; And if you’re permissioned for multiple desktops within a specific delivery group, you’ll get multiple desktops with the same name but numbered in numerical order. For example, if the delivery group’s display name is named TEST and you have permission to 3 desktops within that delivery group, you’ll see: TEST (1), TEST (2), TEST (3). While you can hover over each desktop and see the actual active directory hostname of the workstation and use that as a way to distinguish between the desktops, I think we can all agree about how this can quickly become cumbersome and confusing if you’re actually using each of these desktops on a regular basis. So after some quick research I found a powershell command that allows us to accomplish just that. The command is called Set-BrokerPrivateDesktop. Doing a ‘Get-Help Set-BrokerPrivateDesktop’, found the following switches available:
Change the settings of a private desktop.
Set-BrokerPrivateDesktop [-InputObject] <PrivateDesktop> [-PassThru] [-As
signedClientName <String>] [-AssignedIPAddress <String>] [-ColorDepth <Colo
rDepth>] [-Description <String>] [-IconUid <Int32>] [-InMaintenanceMode <Bo
olean>] [-PublishedName <String>] [-SecureIcaRequired <Boolean>] [-LoggingI
d <Guid>] [-AdminAddress <String>] [<CommonParameters>]
Set-BrokerPrivateDesktop [-MachineName] <String> [-PassThru] [-AssignedClie
ntName <String>] [-AssignedIPAddress <String>] [-ColorDepth <ColorDepth>] [
-Description <String>] [-IconUid <Int32>] [-InMaintenanceMode <Boolean>] [-
PublishedName <String>] [-SecureIcaRequired <Boolean>] [-LoggingId <Guid>]
[-AdminAddress <String>] [<CommonParameters>]
Private desktops are automatically created when a machine is added to a des
ktop group with a DesktopKind of ‘Private’, and these inherit default prope
rties. Use Set-BrokerPrivateDesktop to change the configuration settings of
an existing private desktop.
To specify private desktops, you can choose whether to update by machine na
me, or by passing a PrivateDesktop or an array of PrivateDesktop objects. Y
ou can also use the Uid or an array of Uids instead.
You cannot modify many properties of a private desktop as these contain sta
tus information; for example DNSName, RegistrationState, and OSVersion.
Use Add- and Remove- cmdlets to update relationships between private deskto
ps and other objects. For example, you can add a tag to a private desktop w
Add-BrokerTag $tag -Desktop $desktop.Uid
Similarly, assign users to private desktops with:
Add-BrokerUser $user -PrivateDesktop $desktop
Many of the fields that can be set with this cmdlet can also be set with Se
t-BrokerMachine, such as MaintenanceMode. Using Set-BrokerMachine is prefer
red in these cases.
For more information about desktops, see about_Broker_Desktops; for more in
formation about machines, see about_Broker_Machines.
To see the examples, type: “get-help Set-BrokerPrivateDesktop -examples”.
For more information, type: “get-help Set-BrokerPrivateDesktop -detailed”.
For technical information, type: “get-help Set-BrokerPrivateDesktop -full”.
Based on that feedback, in a powershell windows spawned off of Citrix Studio, I ran the command:
Set-BrokerPrivateDesktop -MachineName “XXX\XXXXX0001” -PublishedName “NFUCHS”
This yielded the results below on the targeted desktop:
This would be a pain in the neck to do for every single desktop, but for scenarios like the one I have here – it makes some perfect sense. In this scenario, the colleague requesting this is from the development team who is sharing desktops among his team for application testing purposes and wanted a better way to display/organize his view of the desktops.
Read more about the command and a further explanation here: http://support.citrix.com/static/kc/CTX127254/help/Set-BrokerPrivateDesktop.html
Hope this helps someone.
Any update on this? I’d love to do this for all VDIs in a particular delivery group.
@Joe Lundy – what update are you looking for? Are you looking to update all individual desktops in a delivery group or are you looking to have all desktops in the delivery group with the same exact name?
nice Article i search for an solution to rename desktops for 300 users i want them to see there windows PC Name , its an Remote PC Citrix Connection
Hi Marcel – glad to have helped you. Do you have a list of all the machine names and AD account names? I would throw them into Excel, organize your data and then just paste them into a notepad document. Then paste them in batches in the powershell prompt. There’s also ways to do this with scripting and setting up arrays, etc – but why be complicated!
Column A(Set-BrokerPrivateDesktop -MachineName) Column B(“XXX\XXXXX0001”) Column C(-PublishedName) Column D(“NFUCHS”)