With this week release of Feature Pack 2 for Citrix XenApp and XenDesktop 7.6 also comes Citrix Session Recording 7.6.100.
This piece of software was the missing part of my upcoming release of Automation Framework 3.0, so I went on a mission to get it automated.
I immediately stumbled upon this blog post from Citrix Virtualization SE Georg Kuruvilla, and as he says “the installation process was a little tedious“!
Add missing eDoc information to the mix and you get the picture. Let’s get started!
Session Recording Player
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) $Vendor = "Citrix" $Product = "Session Recording Player" $PackageName = "SessionRecordingPlayer" $Version = "7.6.100" $InstallerType = "msi" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" $LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log" $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 /qn /liewa $LogApp" Start-Transcript $LogPS CD $Version\Player Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Customization" -Verbose Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
Session Recording Agent
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) $Vendor = "Citrix" $Product = "Session Recording Agent" $PackageName = "SessionRecordingAgentx64" $Version = "7.6.100" $InstallerType = "msi" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" $LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log" $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 sessionrecordingservername=csr-01.ctxlab.vmw sessionrecordingbrokerprotocol=https sessionrecordingbrokerport=443 /qn /liewa $LogApp" Start-Transcript $LogPS Write-Verbose "Installing Prerequisites" Install-WindowsFeature -Name MSMQ Install-WindowsFeature -Name MSMQ-HTTP-Support CD $Version\Agent Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Customization" -Verbose Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
Session Recording Administration
#1 Install Windows Features
1 |
powershell.exe Add-WindowsFeature Web-Windows-Auth,Web-Asp-Net,Web-Mgmt-Compat,Web-Metabase,Web-WMI,Web-Lgcy-Scripting,Web-Lgcy-Mgmt-Console,MSMQ,MSMQ-HTTP-Support,Web-Asp-Net45 |
#2 Download Microsoft SQL Server Express 2014
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) $url = "http://download.microsoft.com/download/E/A/E/EAE6F7FC-767A-4038-A954-49B8B05D04EB/ExpressAndTools%2064BIT/SQLEXPRWT_x64_ENU.exe" $output = "$PSScriptRoot\SQLEXPRWT_x64_ENU.exe" $start_time = Get-Date $Vendor = "Microsoft" $Product = "SQL Server Express" $Version = "2014" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" Start-Transcript $LogPS Write-Verbose "Start Downloading $Vendor $Product $Version" -Verbose $wc = New-Object System.Net.WebClient $wc.DownloadFile($url, $output) #OR (New-Object System.Net.WebClient).DownloadFile($url, $output) Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
#3 Install Microsoft SQL Express 2014
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
@echo off REM Batch Wrapper for MDT, Standalone and Chocolatey Installation - (C)2015 xenappblog.com pushd %~dp0 SET AppName=Microsoft SQL Server Express 2014 SET Version=2014 SET OPTIONS= SET OPTIONS=/Q SET OPTIONS=%OPTIONS% /ACTION=Install SET OPTIONS=%OPTIONS% /FEATURES=SQL,SSMS SET OPTIONS=%OPTIONS% /INSTANCENAME=SQLEXPRESS SET OPTIONS=%OPTIONS% /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" SET OPTIONS=%OPTIONS% /SQLSYSADMINACCOUNTS="CTXLAB\Administrator" "BUILTIN\Administrators" SET OPTIONS=%OPTIONS% /AGTSVCACCOUNT="NT AUTHORITY\Network Service" SET OPTIONS=%OPTIONS% /IACCEPTSQLSERVERLICENSETERMS SET OPTIONS=%OPTIONS% /BROWSERSVCSTARTUPTYPE="Automatic" cls echo. echo Installing %AppName% echo. cd %Version% start /wait SQLEXPRWT_x64_ENU.exe %OPTIONS% popd endlocal |
#4 Import and Bind SSL Certificate
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Install-WindowsFeature -Name Web-Server -IncludeManagementTools copy-item "\\mdt-01\mdtproduction$\Applications\Scripts\wildcard.pfx" -Destination C:\Windows\Temp\wildcard.pfx import-module webadministration $PFXPath="C:\Windows\Temp\wildcard.pfx" $PFXPassword="Password" $strThumb="656D9BCE52970C48E235B5C071861f546A7ADBA8" certutil -f -importpfx -p $PFXPassword $PFXPath Remove-Item C:\Windows\Temp\*.pfx -Force Push-Location IIS: cd SslBindings New-webBinding -Name "Default Web Site" -IP "*" -Port 443 -Protocol https get-item cert:\LocalMachine\MY\$strThumb | new-item 0.0.0.0!443 Pop-Location |
Get all the details in the post Securing Citrix X1 StoreFront with Powershell.
#5 Install Session Recording Administration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
Write-Verbose "Setting Arguments" -Verbose $StartDTM = (Get-Date) $Vendor = "Citrix" $Product = "Session Recording Administration" $PackageName = "SessionRecordingAdministrationx64" $Version = "7.6.100" $InstallerType = "msi" $LogPS = "${env:SystemRoot}" + "\Temp\$Vendor $Product $Version PS Wrapper.log" $LogApp = "${env:SystemRoot}" + "\Temp\$PackageName.log" $LogApp2 = "${env:SystemRoot}" + "\Temp\BrokerPSSnapIn.log" $Destination = "${env:ChocoRepository}" + "\$Vendor\$Product\$Version\$packageName.$installerType" $UnattendedArgs = "/i $PackageName.$InstallerType ALLUSERS=1 DATABASEINSTANCE=.\SQLEXPRESS DATABASEUSER=localhost DATABASECREATERUSERNAME=CTXLAB\ADMINISTRATOR DATABASECREATERPWD=Brasil2015 ADDLOCAL=PolicyConsole,SsRecServer,StorageDatabase,RequiredResources /qb /liewa $LogApp" $UnattendedArgs2 = "/i Broker_PowerShellSnapIn_x64.msi /qn /liewa $LogApp2" Start-Transcript $LogPS CD $Version\Administration Write-Verbose "Starting Installation of $Vendor $Product $Version" -Verbose (Start-Process msiexec.exe -ArgumentList $UnattendedArgs2 -Wait -Passthru).ExitCode (Start-Process msiexec.exe -ArgumentList $UnattendedArgs -Wait -Passthru).ExitCode Write-Verbose "Customization" -Verbose Write-Verbose "Stop logging" -Verbose $EndDTM = (Get-Date) Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalSeconds) Seconds" -Verbose Write-Verbose "Elapsed Time: $(($EndDTM-$StartDTM).TotalMinutes) Minutes" -Verbose Stop-Transcript |
The rest is straight forward. Since the certificate is already installed, you just need to select it.
Set Citrix Session Recording Player permissions.
Set the policy you prefer.
Test it out.
I think the best option is to use the “Do not record” policy and enable recording through Citrix Director when needed. Run this command to configure Director integration.
1 |
C:\inetpub\wwwroot\Director\tools\DirectorConfig.exe /configsessionrecording |
Citrix Session Recording is super helpful and if you’re licensed you should get it implemented during your next maintenance window.
Very nice walkthrough of the tedious installation of this “new” feature
Thanks Dagfinn, they’re also part of the Automation Framework 3.0 now.
Hello Trond,
Greetings!
How do i use the above mentioned scripts? i’m new to Citrix. Help me to achieve the needs
Hi Jay. Just copy the text and save the document as .PS1 under \Vendor\Product. Place the installation files under \Version catalog.