Citrix Provisioning Services 5.6 automation

· 2 min read

Other automation blogs I posted :
XenApp 6 Automation
XenDesktop 5 Automation
XenApp 4.5 / 5 Automation

Today, I needed to prepare the deployment of Citrix PVS servers in silent mode, as usual I’m using a distribution / deployment software like Altiris or SCCM to use the scripts you will read in this blog. The following scripts have been found on the Citrix Community and it was so well done by Kevin Bacon I didn’t want and need to build another one from scratch. To deploy the console and the PVS server, we use PowerShell because I needed to add as well a Windows Feature .NET Framework 3.5.1 before begining the Provisioning Services Server deployment. I bring some modification to these scripts to auto install the .Net Framework Feature, add log files for the installation troubleshooting and the PVS console installation.

Unattended installation and PVS farm creation

This first cmd script is the one to run to start the silent installation :

Echo Enabling PowerShell Scripts ...
reg add HKLMSoftwareMicrosoftPowerShell1ShellIdsMicrosoft.PowerShell /v ExecutionPolicy /d Unrestricted /f
Echo Executing Build Script ...
%windir%system32WindowsPowerShellv1.0powershell -nologo "& ""c:PVS_Auto_InstallFramework.ps1"""
%windir%system32WindowsPowerShellv1.0powershell -nologo "& ""c:PVS_Auto_InstallPVSsilent.ps1"""
Echo Build Complete

This PowerShell very short script add the Framework 3.5.1 feature and is launch by the PVSinit.cmd launch script. (Thanx to Joe Shonk IV)

Import-Module Servermanager
Add-WindowsFeature NET-Framework-Core

and this is the big piece and thanks again to Kevin for this work, you will need two tools from the Microsoft Resource Kit ntrights.exe and subinacl.exe. (more…)