Get-BrokerSession, Get-BrokerDesktop, and Get-BrokerMachine Always Returns SessionID:-1

Get-BrokerSession, Get-BrokerDesktop, and Get-BrokerMachine Always Returns SessionID:-1

book

Article ID: CTX210783

calendar_today

Updated On:

Description

Issue:
Get-BrokerSession, Get-BrokerDesktop, and Get-BrokerMachine Always Returns SessionID as "-1"

Details :
In Xenapp 6.x, "Get-xasession" cmdlet returns the session details along with the Windows Session ID. 

The value  returned in XenApp 7.x for SessionID is always "-1" regardless of the Windows session IDs.
Similarly, via OData, SessionID as GUID, but not at integer.

Resolution


The Windows SessionID is no longer available from the Virtual Delivery Agent (VDA) through the XenDesktop/XenApp SDK.

The rationale for this includes these facts:
  • The SessionID can change through the lifetime of a session.
  • SessionIDs are reused for different sessions.
Taken together, this means it’s difficult to guarantee that the value used relates to the intended session.
 
In regards to the OData Queries:
The GUID is a session identifier allocated by XenDesktop that is both invariant and not reused (referred to as the ‘session key’), but any relationship between this and the underlying Windows session ID only exists in the VDA. The Windows session ID is no longer sent from the VDA at all, so none of the site services have access to that data.
 
 

Problem Cause

SessionID is not sent from the VDA anymore in 7.x so the specific data is not accessible through the SDK.

Issue/Introduction

Get-BrokerSession Always Returns Session id -1 in XenApp and XenDesktop. We are using XenDesktop/XenApp 7.5 and we have the following query about SessionId property provided by cmdlet Get-BrokerSession ( And get-broker-desktop).