This is the second post of a series about how to install basic infrastructure components. This was the first one: Install Citrix StoreFront 3.0.1 from the Command Line.
Today I want to share some details of installing a Citrix XenDesktop 7.6 Server VDA from the command line. At the end, you will find (as usual) a PowerShell script that does the job for me (and hopefully for you too).
Now let´s get started…
Prerequisites
Before we can install the VDA component on a Windows Server 2012 R2 system (you can do it also on 2008 R2 if you want, but then you have to tweak a little bit with the Windows Features) we need to take care of the prerequisites. Usually, the installation with the GUI takes care of missing prerequisites.
Today we will do it on our own because you know, I am a control freak and don´t want to do installers what they want to do without my permission 😉
Visual C++ Redistributables
You need Microsoft Visual C++ 2008, 2010, and 2013 Runtimes (32-bit and 64-bit) on your VDA. In detail this means the installer is searching for the following versions:
- MS_VCPP_2008_redist_9.0.30729.4148_x64
- MS_VCPP_2010_redist_10.0.30319_x64
- MS_VCPP_2010_redist_10.0.30319_x86
- MS_VCPP_2013_redist_12.0.21005_x86
- MS_VCPP_2013_redist_12.0.2100_x64
See the screenshot below, it shows the necessary versions. The other redistributables are installed through Windows Update.
.NET Framework
You also need Microsoft .NET Framework 4.5.1 (4.5.2 and 4.6 are also supported) on the system. If you have run Windows Update on the server and have installed everything you could it should be fine.
Microsoft Media Foundation
You need to activate Media Foundation before you install the Citrix VDA in order to support features such as HDX MediaStream Windows Media Redirection. Luckily Media Foundation is enabled during the installation of the Windows-Feature “Desktop Experience”. Look at the documentation at docs.citrix.com for further information.
Services
Please be aware of the fact that the Print Spooler Service needs to be running because otherwise, the setup of the VDA will fail. I have seen some highly secure environments where the Spooler Service was deactivated in the base operating system image.
Windows-Features
In order to install the needed Windows-Features we open PowerShell and run the commands below:
# Windows-Feature Desktop-Experience Write-Host "Installing Roles and Features" -ForegroundColor DarkGreen Add-WindowsFeature Desktop-Experience # Windows-Feature Remote Desktop Services Host Write-Host "Installing RDS-RD-Server" -ForegroundColor DarkGreen Add-WindowsFeature RDS-RD-Server # Windows-Feature Remote Assistance Write-Host "Installing Remote-Assistance" -ForegroundColor DarkGreen Add-WindowsFeature Remote-Assistance
We need to reboot the server because Desktop-Experience and RDS-RD-Server need a reboot.
The following two Windows-Features are optional:
# Windows-Feature XPS Viewer Write-Host "Installing XPS-Viewer" -ForegroundColor DarkGreen Add-WindowsFeature XPS-Viewer # Windows-Feature Windows Search Service Write-Host "Installing Search-Service" -ForegroundColor DarkGreen Add-WindowsFeature Search-Service
Install Visual C++ Redistributables
Now we will install the C++ Redistributables. This could be done like this:
# MS_VCPP_2008_redist_9.0.30729.4148_x64 Write-Host "MS_VCPP_2008_redist_9.0.30729.4148_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2008_SP1\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2010_redist_10.0.30319_x64 Write-Host "MS_VCPP_2008_redist_10.0.30319_x64" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2010_RTM\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2010_redist_10.0.30319_x86 Write-Host "MS_VCPP_2010_redist_10.0.30319_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2010_RTM\vcredist_x86.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2013_redist_12.0.21005_x86 Write-Host "MS_VCPP_2012_redist_12.0.2100_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2013_RTM\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2013_redist_12.0.2100_x64 Write-Host "MS_VCPP_2012_redist_12.0.2100_x64" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2013_RTM\vcredist_x86.exe" -ArgumentList "/Q" -Wait
Check Printer Spooler
We move on with configuring the Printer Spooler. If you are sure he is running skip this step.
# http://docs.citrix.com/en-us/xenapp-and-xendesktop/7-6/xad-build-new-enviroment/xad-install-prepare.html # VDA won´t install if Printer Spooler is not running set-service -Name "Spooler" -StartupType Automatic -PassThru | Start-service
VDA Installation
Now that all prerequisites are met we can go on with the installation. You can choose from many command line options to install a VDA. This is a list of them for your reference:
- /COMPONENTS VDA, PLUGINS
- /EXCLUDE excludes a package from installation
- /HELP, /H, /? Shows this dialog
- /NOREBOOT Suppress reboot after installation (if needed)
- /PASSIVE, /QUIET Do not show UI during installation
- /BASEIMAGE Enables Personal vDisk support
- /XA_SERVER_LOCATION XenApp Server address for Citrix Receiver
- /CONTROLLERS List of controllers to register with (FQDNs)
- /SITE_GUID XenServer site GUID in AD
- /HDXFLASHV2ONLY Prevents installation of Flash Redirection legacy binaries for enhanced security
- /ENABLE_HDX_3D_PRO Installs HDX 3D Pro Virtual Desktop Agent
- /KEY_FILE Location of the key file for installing HDX 3D Pro
- /ENABLE_HDX_PORTS Open up HDX ports in Windows firewall (if enabled)
- /ENABLE_REAL_TIME_TRANSPORT Opens UDP ports 16500 – 16509 to enable HDX Real-time Transport for Audio in Windows Firewall (if enabled)
- /ENABLE_REMOTE_ASSISTANCE Enable Remote Assistance
- /OPTIMIZE Set up registry for faster VDA operation
- /PORTNUMBER Port number to use for VDA <-> controller communication
- /REMOVE Remove components (instead of installing)
- /RECONFIGURE Perform VDA reconfiguration
- /MASTERIMAGE Set up the VDA as a Master Image
I like it simple therefore this is everything I am doing to install the VDA today:
# Install Citrix XenDesktop 7.6.300.7020 VDA Write-Host "Part 02 - Installing XenDesktop VDA" -ForegroundColor Green start-process -FilePath "$labsources\XenDesktop_76\VDA\VDAServerSetup_7.6.300.exe" -ArgumentList "/noreboot /quiet /components VDA" -Wait
Additionally, you can install Citrix Receiver if you need it. I have added a command as an example. All command line options can be found here.
# Install Receiver 14.3.100.10 Write-Host "Part 02 - Installing Receiver 14.3.100.10" -ForegroundColor Green start-process -FilePath "$labsources\XenDesktop_76\VDA\CitrixReceiver.exe" -ArgumentList "/noreboot /silent /includeSSON /ADDLOCAL=ReceiverInside,ICA_Client,WebHelper,SSON,AM,USB,DesktopViewer,Flash ALLOWADDSTORE=N" -Wait
Script
Here is the complete script to install a VDA from the Command Line. I haven´t inserted a reboot handling in it, so you have to take care of the reboots on your own. It is only meant to give you an idea of what needs to be done to install the VDA in that way.
<# .SYNOPSIS This Script installs a Citrix XenDesktop 7.6 Server VDA. .DESCRIPTION The following components are installed: - Microsoft Visual C++ 2008, 2010 and 2013 Redistributables - necessary Roles and Features - XenDesktop Server VDA 7.6.300.7020 - Receiver 14.3.100.10 - no further customization in this script .PARAMETER .NOTES This script was tested on Windows Server 2012 R2 .LINK http://www.RISConsulting.de .AUTHOR Sinisa Sokolic .Date 2015-10-19 #> # Script Variables $labsources = "\\FILESERVER\SHARE" Write-Host "Install: Citrix XenDesktop 7.6.300 VDA" -ForegroundColor Green # Part 01 - Prerequisites Write-Host "Part 01 - Installing Prerequisites..." -ForegroundColor Green # MS_VCPP_2008_redist_9.0.30729.4148_x64 Write-Host "MS_VCPP_2008_redist_9.0.30729.4148_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2008_SP1\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2010_redist_10.0.30319_x64 Write-Host "MS_VCPP_2008_redist_10.0.30319_x64" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2010_RTM\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2010_redist_10.0.30319_x86 Write-Host "MS_VCPP_2010_redist_10.0.30319_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2010_RTM\vcredist_x86.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2013_redist_12.0.21005_x86 Write-Host "MS_VCPP_2012_redist_12.0.2100_x86" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2013_RTM\vcredist_x64.exe" -ArgumentList "/Q" -Wait # MS_VCPP_2013_redist_12.0.2100_x64 Write-Host "MS_VCPP_2012_redist_12.0.2100_x64" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VcRedist_2013_RTM\vcredist_x86.exe" -ArgumentList "/Q" -Wait Write-Host "Installing Roles and Features" -ForegroundColor Green # Windows Feature Desktop Experience Write-Host "Installing Desktop-Experience" -ForegroundColor DarkGreen Add-WindowsFeature Desktop-Experience # Windows Feature Remote Desktop Services Host Write-Host "Installing RDS-RD-Server" -ForegroundColor DarkGreen Add-WindowsFeature RDS-RD-Server # Windows Feature Remote Assistance Write-Host "Installing Remote-Assistance" -ForegroundColor DarkGreen Add-WindowsFeature Remote-Assistance # Windows Feature XPS Viewer Write-Host "Installing XPS-Viewer" -ForegroundColor DarkGreen Add-WindowsFeature XPS-Viewer # Windows Feature Windows Search Service Write-Host "Installing Search-Service" -ForegroundColor DarkGreen Add-WindowsFeature Search-Service # Check Printer Spooler # http://docs.citrix.com/en-us/xenapp-and-xendesktop/7-6/xad-build-new-enviroment/xad-install-prepare.html # VDA won´t install if Printer Spooler is not running set-service -Name "Spooler" -StartupType Automatic -PassThru | Start-service ######################################################## # Please reboot the server before moving further.... ######################################################## Write-Host "Finished Installing Prerequisites..." -ForegroundColor Green # Part 02 - Citrix Write-Host "Part 02 - Installing Software..." -ForegroundColor Green # Install Citrix XenDesktop/XenApp 7.6.300.7020 VDA Write-Host "Part 02 - Installing XenDesktop/XenApp VDA" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\VDAServerSetup_7.6.300.exe" -ArgumentList "/noreboot /quiet /components VDA" -Wait # Install Receiver 14.3.100.10 Write-Host "Part 02 - Installing Receiver 14.3.100.10" -ForegroundColor DarkGreen start-process -FilePath "$labsources\XenDesktop_76\VDA\CitrixReceiver.exe" -ArgumentList "/noreboot /silent /includeSSON /ADDLOCAL=ReceiverInside,ICA_Client,WebHelper,SSON,AM,USB,DesktopViewer,Flash ALLOWADDSTORE=N" -Wait # Wait 10 seconds to see errors if the occured start-sleep -Seconds 10 # Reboot system Write-Host -ForegroundColor Green “Rebooting System..." Restart-Computer -ComputerName $env:COMPUTERNAME
I hope this is useful for you.
All information is without warranty.
Cheers,
Sinisa
One response to “Install Citrix XenDesktop 7.6 Server VDA from the Command Line”
[…] was the first one: Install Citrix StoreFront 3.0.1 from the Command Line. The second one is here: http://www.sinisasokolic.com/install-citrix-xendesktop-7-6-server-vda-from-the-command-line/. Because we need a Controller for our infrastructure to work correctly it is crucial to have it in […]