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…
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 now, 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:
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 setup of the VDA will fail. I have seen some high 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.
# https://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
Now that all prerequisites are met we can go on with the installation.You can choose from many commandline options to install a VDA. This is a list of them for your reference:
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 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
Here ist 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.
# 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 # https://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 without warranty.
Cheers,
Sinisa