Desktop Studio Does Not Show Current User Name

Desktop Studio Does Not Show Current User Name

book

Article ID: CTX128715

calendar_today

Updated On:

Description

Desktop Studio console does not display the current user in the active XenDesktop session. Similarly, PowerShell cmdlet Get-BrokerDesktop does not have entries for SessionUserName and SessionUserSID. In this situation, the user disconnected from the existing XenDesktop session cannot reconnect to the existing XenDesktop session.

Desktop Studio console on Desktop Delivery Controller (Controller):

User-added image

Get-BrokerDesktop Result:

PS C:\> get-brokerdesktop -DNSName winxpk.joeiii.ctx

…..

LaunchedViaHostName      : XD5DDC.joeIII.ctx

LaunchedViaIP                    : 192.168.200.20

LicenseId                             : F3BC5534

MachineName                     : JOEIII\WINXPK

MachineUid                             3

OSType                                  Windows XP Service Pack 3

OSVersion                          : 5.1.2600.196608

PowerActionPending              False

PowerState                             On

Protocol                                  HDX

PublishedApplications        : {}

PublishedName                  :

RegistrationState                : Registered

SID                                      : S-1-5-21-2219640574-753699312-2712279717-1111

SecureIcaActive                  : False

SecureIcaRequired             :

SessionId                            : 0

SessionState                           Active

SessionStateChangeTime      3/03/2011 9:56:17 AM

SessionUid                              7

SessionUserName             :

SessionUserSID                 :

SmartAccessTags             :

StartTime                            : 3/03/2011 9:56:11 AM

SummaryState                        InUse

…..

Environment

The above mentioned sample code is provided to you as is with no representations, warranties or conditions of any kind. You may use, modify and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that (a) the sample code may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the sample code fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the sample code. In no event should the code be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SAMPLE CODE, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Although the copyright in the code belongs to Citrix, any distribution of the sample code should include only your own standard copyright attribution, and not that of Citrix. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the sample code.

Resolution

Solution 1
Check the GPO setting – Do not process the legacy run list and change the setting to Not Configured or Disabled using Group Policy Object Editor. It is located in Computer Configuration\Administrative Template\System\Logon and User Configuration\Administrative Template\System\Logon.

Notes:

  • Because the setting can be enabled in both Computer Configuration and User Configuration, Computer Configuration takes precedence over the policy setting in User Configuration.

  • Because of the possibility of multiple GPOs applied to the Active Directory Organizational Unit containing the Virtual Delivery Agent, you must carefully investigate how many GPOs are applied to the Organizational Unit and which GPO is actually blocking the Citrix Session Helper from running.

Solution 2

Other issues have been found where username is not returned for the first session only. In this scenario using Procmon Boot Logging revealed that sysprep is running upon first start and causes delay. To resolve this problem we need to eliminate the sysprep running at startup, this should be done by properly creating the Master Image:
https://docs.citrix.com/en-us/xenapp-and-xendesktop/7-5/cds-delivery-group-overview/cds-catalogs-landing-page/cds-prep-master-vm-rho.html

Other solution is to manually remove sysprep operation from following registry:
HKEY_LOCAL_MACHINE\System\Setup
Value Name: Cmdline

Problem Cause

This is caused by one of the Group Policy Object settings - Do not process the legacy run list is enabled. This setting prevents Citrix Session Helper (ctxidhlp.exe, located in HKLM\Software\Microsoft\Windows\CurrrentVersion\Run on the Virtual Delivery Agent) from running within the XenDesktop session. The Controller relies on this process to run within a XenDesktop session as a trustworthy source of vital user information. Without this information, the Controller cannot broker the re-connection to a disconnected session.

Other cause could be the sysprep process running upon VDA restart due to incomplete master image preparation. This can be verified using Procmon Boot Time Log.

Issue/Introduction

This article contains a resolution to the following symptom: "Desktop Studio does not show current user name".