Citrix Delivery Group's & Session Reconnection Policy

2 min read
Citrix Delivery Group's & Session Reconnection Policy
Update any Delivery Group's setting for Session Reconnection and view them all at once.

Sometimes in this world you’d like to reconnect to the things you’ve become disconnected from. Citrix is the same way and their are ways to bring you back to the things.

Sometimes you do not want to reconnect to the things that are disconnected. Citrix is the same way and their are ways to have you not reconnect but rather start a new path.

💡
What are the available settings for Session Reconnection Policy?

Always – This is the default and matches the behavior of a VDI session. Sessions always roam, regardless of client device.

DisconnectedOnly – This reverts back to the XenApp 6.x and earlier behavior. Sessions may be roamed between client devices by first disconnecting them (or using Workspace Control) to explicitly roam them. However, active sessions are not stolen from another client device, and a new session is launched instead.

SameEndpointOnly – This matches the behavior of the 'ReconnectSame' registry setting in XenApp 6.x. Each user will get a unique session for each client device they use, and roaming between clients is completely disabled.

Using Disconnected Only

Having the Session Reconnection Policy set to Disconnected Only is a good idea if you have people roaming from multiple end points attempting to use the same Citrix Virtual Application at the same time at different places.

Using Always

Having the Session Reconnection Policy set to Always is a good idea if you have people roaming endpoints and looking to also roam their Citrix Virtual Desktop. This is akin to taking your computer with you from place to place, always picking up where you left off and not starting over with a new Citrix Virtual Desktop while you’ve left your old one behind, rather bring your old one with you.

Keep in mind this powershell script is written to run from a Delivery Controller. There is no need to set any variables. When prompted you can type in a given Delivery Group name and next type in what you’d like the Session Reconnection Policy to be and it will magically set. A great tool to keep handy.

Best Regards
Michael Wood


#------------------Display Banner-------------------------

Clear-Host
Write-Host""
Write-Host "-= Set Citrix Deployment Group's SessionReconnection Policy =-" -ForegroundColor Cyan
Write-Host""
Write-Host "Available settings for this policy are:" -ForegroundColor Yellow
Write-Host "------------------------------------------------"
Write-Host "Always – This is the default and matches the behavior of a VDI session."
Write-Host "Sessions always roam, regardless of client device."
Write-Host""
Write-Host "DisconnectedOnly – This reverts back to the XenApp 6.x and earlier behavior."
Write-Host "Sessions may be roamed between client devices by first disconnecting them (or"
Write-Host "using Workspace Control) to explicitly roam them. However, active sessions"
Write-Host "are not stolen from another client device, and a new session is launched"
Write-Host "instead."
Write-Host""
Write-Host "SameEndpointOnly – This matches the behavior of the 'ReconnectSame' registry"
Write-Host "setting in XenApp 6.x. Each user will get a unique session for each client"
Write-Host "device they use, and roaming between clients is completely disabled."
Write-Host""
Write-Host""
Write-Host "Current Settings..." -ForegroundColor Yellow
Add-PSSnapin Citrix*
Write-Host "------------------------------------------------"
Get-BrokerAppEntitlementPolicyRule * | Select-Object Name,SessionReconnection | Out-Host
Write-Host""

#------------------Application-------------------------

Write-Host "Set Citrix Deployment Group SessionReconnection Policy..." -ForegroundColor Yellow
$DG = Read-Host 'Enter Deployment Group Name'
$SessionReconnection = Read-Host 'Enter SessionReconnection Policy (Always, DisconnectedOnly, or SameEndpointOnly)'

Write-Host""
Write-Host "Processing..." -ForegroundColor Yellow
Set-BrokerAppEntitlementPolicyRule $DG -SessionReconnection $SessionReconnection
Write-Host "Done!" -ForegroundColor Green
Write-Host""

Write-Host "New & Updated Settings..." -ForegroundColor Yellow
Add-PSSnapin Citrix*
Write-Host "------------------------------------------------"
Get-BrokerAppEntitlementPolicyRule * | Select-Object Name,SessionReconnection | Out-Host
Write-Host""
Pause
Virtualize Brief


Follow