This article contains information about changes when configuring the Logoff Behavior for Desktop Groups in the XenDesktop/Virtual Desktop environment.
In XenDesktop 4, you configure the Logoff Behavior setting for a Desktop Group in the Delivery Services Console (DSC). For pooled desktops, the Logoff Behavior configuration controls whether the desktop restarts or does not perform any action when the user logs off from the virtual desktop, as displayed in the following screenshot:
Starting XenDesktop 5 and Virtual apps and Desktop 7.x, Logoff Behavior setting is not available in the console. A new Desktop Group attribute, ShutdownDesktopsAfterUse replaces the restart option in the GUI. The ShutdownDesktopsAfterUse attribute is a Boolean value and is True by default for pooled and streamed desktop groups.
With Virtual Apps and Desktop 7.x, a logoff of a user reboots the VDA as ShutdownDesktopsAfterUse is enabled by default.
To change the Logoff Behavior using the PowerShell SDK, complete the following procedure:
Note: In the following procedure, the PowerShell statements are specified in upper case only for readability purposes. Generally, the PowerShell commands are not case-sensitive.
Run PowerShell as an Administrator on a DDC
Run the following command to load the Citrix Modules:
ASNP Citrix.*
Run the following command to list all the Desktop Groups in the environment and the respective properties:
Get-BrokerDesktopGroup
Run the following commands to either enable or disable the power action of the Desktop, respectively:
Set-BrokerDesktopGroup -Name "Desktop Group Name" -ShutdownDesktopsAfterUse $True Set-BrokerDesktopGroup -Name "Desktop Group Name" -ShutdownDesktopsAfterUse $False
You may refer to the developer document for the additional attributes and syntax here https://developer-docs.citrix.com/projects/citrix-virtual-apps-desktops-sdk/en/latest/Broker/Set-BrokerDesktopGroup/#set-brokerdesktopgroup