Dynamic session recording
Previously, session recording started strictly at the very beginning of sessions that met the recording policies and stopped strictly when those sessions ended.
Starting with the 7.18 release, Citrix introduces the dynamic session recording feature. With this feature, you can start or stop recording a specific session or sessions that a specific user launches, at any time during the sessions.
Note:
To make the feature work as expected, upgrade Session Recording, VDA, and Delivery Controller to Version 7.18 or later.
Enable or disable dynamic session recording
On the Session Recording agent, a registry value is added for enabling or disabling the feature. The registry value is set to 1 by default, which means that the feature is enabled by default.
To enable or disable the feature, complete the following steps:
- After the Session Recording installation is complete, log on as an administrator to the machine where you installed the Session Recording agent.
- Open the Registry Editor.
- Browse to
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SmartAuditor
. - Set the value of DynamicControlAllowed to 0 or use the default value, 1.
1: enable dynamic recording
0: disable dynamic recording - Restart the Session Recording agent to make your setting take effect.
If you are using MCS or PVS for deployment, change the setting on your master image and perform an update to make your change take effect.
Warning:
Incorrectly editing the registry can cause serious problems that might require you to reinstall your operating system. Citrix cannot guarantee that problems resulting from the incorrect use of the Registry Editor can be solved. Use the Registry Editor at your own risk. Be sure to back up the registry before you edit it.
Dynamically start or stop recording by using PowerShell commands in the Citrix SDKs
You can use the dynamic session recording feature in both on-premises and Citrix Cloud environments. To use the feature in an on-premises environment, use the Citrix Virtual Apps and Desktops PowerShell SDK. To use the feature in a Citrix Cloud environment, use the Citrix DaaS Remote PowerShell SDK (formerly Citrix Virtual Apps and Desktops Remote PowerShell SDK).
To determine which SDK to install and use, be aware of the Delivery Controller that you specified when creating your recording policy. If you select the Citrix Cloud Controller check box to record sessions in a Citrix Cloud environment, you must validate your Citrix Cloud credentials.
Note:
Do not install the Citrix DaaS Remote PowerShell SDK on a Citrix Cloud Connector machine. You can install the Remote PowerShell SDK on any domain-joined machine within the same resource location. We recommend that you do not run this SDK’s cmdlets on Cloud Connectors. The SDK’s operation does not involve the Cloud Connectors.
The following table lists three PowerShell commands that both Citrix SDKs provide for dynamic session recording.
Command | Description |
---|---|
Start-BrokerSessionRecording | Lets you start recording a specific active session, a list of active sessions, or sessions launched by a specific user. If a specific session is originally set up for an event-only recording according to policy settings, using this command allows you to start capturing the screen in addition to the target events. For more information, run Get-Help Start-BrokerSessionRecording to see the command online help. |
Stop-BrokerSessionRecording | Lets you stop recording a specific active session, a list of active sessions, or sessions launched by a specific user. For more information, run Get-Help Stop-BrokerSessionRecording to see the command online help. |
Get-BrokerSessionRecordingStatus | Lets you get the recording status of a specific active session. For more information, run Get-Help Get-BrokerSessionRecordingStatus to see the command online help. |
For example, when a user reports an issue and needs timely support, you can use the feature to dynamically start recording the user’s active sessions. You can play the live recording to proceed with the follow-up troubleshooting. You can do the following:
-
(For Citrix Virtual Apps and Desktops PowerShell SDK only) Launch PowerShell from the Citrix Studio console.
-
Use the
Get-BrokerSession
command to get all the active sessions of the target user. -
Use the
Get-BrokerSessionRecordingStatus
command to get the recording status of the specified session.Note:
The -Session parameter can accept only one session UID at a time.
-
Use the
Start-BrokerSessionRecording
command to start recording. By default, a notification message appears to inform users of the recording activity.The following table shows common ways of using the
Start-BrokerSessionRecording
command.Command Description Start-BrokerSessionRecording -User DomainA \ UserA
Starts recording all sessions of user UserA in the domain named DomainA and notifies UserA. Start-BrokerSessionRecording -User DomainA \ UserA -NotifyUser $false
Starts recording all sessions of user UserA in the domain named DomainA and does not notify UserA. Start-BrokerSessionRecording -Sessions $SessionObject
Starts recording all sessions in the object named $SessionObject and notifies the user. To get the object $SessionObject, run $SessionObject=Get-BrokerSession –username UserA
. The name of an object is prefixed with a dollar sign $. For more information, see Step 2 and the command online help.Start-BrokerSessionRecording -Sessions uid1,uid2,…,uidn
Starts recording the sessions UID1
,UID2
, … , andUIDn
, and notifies the users. -
Use the
Get-BrokerSessionRecordingStatus
command to get the recording status of each target session. The status is supposed to be SessionBeingRecorded. -
Play back the Live or Complete recordings and proceed with the follow-up troubleshooting.
Note:
When you play a Complete recording ended by the
Stop-BrokerSessionRecording
command, the last section of the timeline on the player progress bar might show gray. And, the last section of the recorded session is idle. It is not obvious when the recorded session has constant activities. -
Use the
Stop-BrokerSessionRecording
command to stop recording when the reported issue has been triaged or resolved.The following table shows common ways of using this command:
Command Description Stop-BrokerSessionRecording -User DomainA
\ UserAStops recording all sessions of user UserA in the domain named DomainA. Stop-BrokerSessionRecording -Sessions $SessionObject
Stops recording all sessions in the $SessionObject. Stop-BrokerSessionRecording -Sessions uid1,uid2,…,uidn
Stops recording the sessions UID1
,UID2
, … , andUIDn
.
On the Citrix Studio Logging screen, you can view the resulting logs of the Start-BrokerSessionRecording
and Stop-BrokerSessionRecording
commands.