Verify Session Remote Start API Calls
Enumeration and Launch
A sample script is provided in the Citrix download package to verify the installation, configuration, and API calls. Script Name: enum_launch_example.ps1
Recommendation:
- Run the script on the third-party Authentication Service host for proper verification.
- The script retrieves and launches resources by calling Session Remote Start APIs.
Execution in PowerShell:
Run the script with two mandatory parameters:
- Fqdn – The FQDN of the Session Remote Start server
-
UPNs – An array of UPNs and Resource Names, formatted as:
-
UPN:ResourceName
(example:user@example.com:Desktop1
) - If the resource name is omitted, the first available resource will be launched.
-
Example:
.\enum_launch_example.ps1 -Fqdn "srs-server.domain.com" -Upns "SRSuser1@domain.com:SRS-Server2019","SRSuser2@domain.com"
Explanation:
-
SRSuser1@domain.com
is assigned to launch the desktop “SRS-Server2019” (the name as it appears in their workspace). -
SRSuser2@domain.com
has no specific resource assigned. In this case, the script will automatically launch the first available resource from the user’s resource list.
This ensures that Session Remote Start correctly retrieves and launches desktops for the specified users.
Output:
Review the script execution output to ensure resources are pre-launched successfully.
Alternatively, verify in Citrix Studio. Before running the script, no active sessions must be visible for the target machines.
After running the script: The sessions should appear in a disconnected state, confirming that the resources are pre-launched and ready for user reconnection.
Logoff
This script logs off user sessions by calling Session Remote Start APIs. A sample script is provided in the Citrix download package to verify. The Script Name: logoff_example.ps1
Running the Logoff Script in PowerShell with two mandatory parameters:
- Fqdn – The FQDN of the Session Remote Start server.
- Upns – An array of UPNs (User Principal Names). By default, the script logs off all sessions, regardless of their state.
- AllDisconnected: It will only log off the disconnected sessions if set to true.
- SRSLaunchedDisconnectedOnly: Set to
true
to log off only sessions launched by the Session Remote Start Service that are currently disconnected.
Example:
.\logoff_example.ps1 -Fqdn "srs-server.domain.com" -Upns "SRSuser1@domain.com","SRSuser2@domain.com" -SRSLaunchedDisconnectedOnly $true
In this example, the script will logoff all the resources launched by Session Remote Start service and currently in disconnected state for the users SRSuser1@domain.com
and SRSuser2@domain.com
.
Output:
Note:
This API only sends the logoff request and does not wait for the sessions to fully log off.