Friday 9 January 2015

XenDesktop 5.6 - Change disconnected behaviour to Shutdown

While using Atlantis ILIO for not none persistent desktops run purely from memory it is important to reclaim as much space as possible back from the Datastore. This will ensure you don't run out of space. One problem with this in Xendesktop 5.6 is when Users disconnect from from there sessions. From the GUI you are only able to suspend the desktop after a certain number of minutes.
This will not reclaim any space. However there is an alternative, we can use the PowerShell to change the settings.





First I have run a Get to show the current settings. As you can see the current settings are set as follows. The action is set to do nothing and the timer is set to 0 minutes. There is a couple of option you may want to change depending on when you want your desktops to shut down. You can set these setting for Peak hours and/or OffPeak Hours.

Get-BrokerDesktopGroup "DesktopGroupName"


Now I am going to run two PS commands to set the OffPeak and PeakDisconnectTimeout. (I am only using 5 min in my demo environment)


Set-BrokerDesktopGroup "DesktopGroupName" -OffPeakDisconnectTimeout 5
Set-BrokerDesktopGroup "DesktopGroupName" -PeakDisconnectTimeout 5


Now I am going to run two PS commands to set the action to Shut down this will then reclaim the space if users leave their desktop in a disconnected state.


Set-BrokerDesktopGroup "DesktopGroupName" -OffPeakDisconnectAction Shutdown
Set-BrokerDesktopGroup "DesktopGroupName" -PeakDisconnectAction Shutdown


And there you go now when a user disconnects from the session it will remain disconnected until the time out is hit then the desktop will shutdown as detailed in the action.

No comments:

Post a Comment