Product Documentation

Dynamic session recording

Jun 04, 2018

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 both 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 key is added for enabling or disabling the feature. The key is set to 1 by default, which means that after installation or upgrade to 7.18, the feature is enabled by default. 

To enable or disable the feature, do the following:

  1. After the Session Recording installation is complete, log on as an administrator to the machine where you installed the Session Recording Agent.
  2. Open the Registry Editor.
  3. Browse to HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\SmartAuditor.
  4. Set the value of DynamicControlAllowed to 0 or use the default value, 1.
    1: enable dynamic recording
    0: disable dynamic recording
  5. 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 Registry Editor can be solved. Use 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 Broker SDK

The following table lists three PowerShell commands added in the Citrix Broker SDK for the dynamic session recording feature. For information on the Citrix Broker SDK, see Citrix SDKs and APIs and Citrix.Broker.Admin.V2

Command Description

Start-BrokerSessionRecording

Lets you start recording:

  • A specific active session
  • A list of active sessions
  • Sessions launched by a specific user

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
  • 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, and play back the live recording to proceed with the follow-up troubleshooting. You can do the following:

Launch PowerShell from the Citrix Studio console.

localized image

Use the Get-BrokerSession command to get all active sessions of the target user.

localized image

Use the Get-BrokerSessionRecordingStatus command to get the recording status of the specified session.

localized image

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, … , and uidn, 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 in the Session Recording Player and proceed with the follow-up troubleshooting.

Note

The last section of the timeline on the Player progress bar might show gray when you play back a "Complete" recording ended by the Stop-BrokerSessionRecording command 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 \ UserA

Stops 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, … , and uidn.

On the Citrix Studio Logging screen, you can view the resulting logs of the Start-BrokerSessionRecording and Stop-BrokerSessionRecording commands.

localized image