In XenDesktop 5, it is possible to configure the ShutdownDesktopsAfterUse property on a Desktop Group through PowerShell SDK. This property is intended to allow the Brokers in the site to shutdown VDAs in the Desktop Group when the user session has ended.
If a logoff script or other third party application is configured to run on user logoff, it might not complete on time before the VDA is switched off. This behavior is specific to Windows 7 VDAs.
In this issue the Windows 7 operating system does not provide a signal to the running processes that the logoff script has completed. As a result, there is no mechanism for the Workstation Agent service to know that there is still a process completing logoff tasks. Instead it is notified to terminate by the Windows 7 operating system like any other running process.
After the Workstation Agent service starts shutting down, it signals to the Broker that the session has ended. The Broker then signals to the Hosting Infrastructure component to shutdown the VDA. If the logoff script (or third party application) is still running when this occurs, the VDA is shutdown without waiting for the logoff script to complete.
As a workaround, do not set the ShutdownDesktopsAfterUse property on the Desktop Group, and initiate the logoff process from within the logoff script (or third party application) when its tasks have completed.
Caution! After completing the preceding workaround, if the logoff activity takes a longer time on VDA 5.6.300 or earlier, then the issue introduced in fix #LA3405 might occur. Therefore, you must install VDA 5.6.400 and set the registry for ShutdownDesktopsAfterUse property as disabled.
Attempts by an endpoint to log on to a VDA can fail. The issue occurs in cases where the logoff process of an earlier session takes an exceptionally long time and the VDA is brokered for a new session prematurely.
To enable this fix, you must set the following registry key:
Caution! Refer to the Disclaimer at the end of this article before using Registry Editor.
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\PortICA
Name: DelayLogoffNotificationEnabled
Type: REG_DWORD
Data: <value greater than zero>
[From XD560VDAWX86400][#LA3405]
This is a design limitation.