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 : 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) 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. Unattended PVS farm joining Now We know how to install a new Citrix Provisioning Services server and set it up. The next part of this blog is how to automate the addition of PVS Farm members with ConfigWizard.exe (located wiht a default installation in C:\Program Files\Citrix\Provisioning Services\) First you need to go to the directory where ConfigWizard.exe is located on a configured PVS server (The one we just installed for ex) to create a response file ConfigWizard.ans, you can do it by running ConfigWizard.exe /s and follow the next steps : You will find the ConfigWizard.and file in the following directory : "C:\ProgramData\Citrix\Provisioning Services" Here is my ConfigWizard.ans file : Now to use this answer file, we need to deploy a new PVS server, copy the ConfigWizard.ans file onto the new servers within the farm and modify the IP address in the ConfigWizard.ans file to match each server in the PVS farm. Once the file is copied in the same directory as ConfigWizard.exe you just need to run the following command : ConfigWizard.exe /a , reboot your server and you're done ! To automate this last step, you…

If you're looking for automation / unattended installation of Citrix XenApp 4.5 / 5 check here : XenApp 4.5 / 5 unattended installation If you need to industrialize the installation of Citrix XenApp 6, you can follow this blog to create a new farm using command line and add a new XenApp server to an existing farm. On my side, I used the scripts you'll read bellow with a deployment software (Altiris, SCCM etc...) Unattended XenApp 6 farm creation Before begging to install XenApp 6 you need to add one role and one feature to your Windows 2008 R2 server. To do so, you need to use PowerShell since servermanagercmd.exe reach his end of life. Open a PowerShell shell and type Import-Module Servermanager to Load the Server Manager module into the Windows PowerShell session before working with Server Manager cmdlets. Once it's done, you need to type this two command lines to add the .NET Framework 3.5.1 feature and the Remote Desktop Session Host role You will need to reboot the computer before running the Citrix XenApp 6 unattended installation. To run an automated installation you will use the XenAppSetupConsole.exe tool on the DVD in the "XenApp Server Setup\bin" folder. This tool can be use with the following parameters : So, If you want to install XenApp 6 Enterprise Edition and create logs of this installation, just execute the following line where x:\ is either your DVD drive, a mapped drive or a share \\server\share\... The setup done and a reboot is required. The next step you will create a new Citrix XenApp 6 farm. You need to continue this configuration to create a dsn file where you'll include the database name and the database server name. I used for this example a Microsoft SQL2008 SP3 server where I previously created the TEST_XA6 empty database. The file sql.dsn : Save the sql.dsn file as a text file and you can either copy it before launching the configuration either leave it on a share and change the path in the next command line to use the correct path. To realize an unattended farm creation, we will use the XenAppConfigConsole.exe utility (you can find it in C:\Program Files (x86)\Citrix\XenApp\ServerConfig\ ) and here are the parameters you can use : So I want to setup a new farm (XA6_TEST), add the local administrator as XenApp administrator, specify the license server address and port,…

The goal of the following blog is to have a cheap backup system for my XenServer @ Home. Remember snapshots are not backup and it's not recommended to backup you VMs the way I will describe it in a production environment. You can find a Citrix KB to add local storage here : http://support.citrix.com/article/CTX121313   The idea is to install a new hard drive in my XenServer @ Home, configure it and host an OpenFiler VM to share a NFS volume. As the NFS volume will be shared, I want to use it as a backup share to archive all my VMs snapshots with the VM Protection Policies option in Citrix XenServer 5.6 FP1. This option (VM Protection Policies) is available only with the platinum XenServer license. So I plugged the new hard drive and plug it in my XenServer @ Home and switch on the box, then to enable and activate the drive, I needed first to check XenServer was able to see the new hard drive, i used the fdisk -l command : My new hard drive is here, I can notice the /dev/sdb which is empty. Then I needed to create a physical volume by using the pvcreate /dev/sdb command line : Now the physical volume created I can create a logical volume by using the xe sr-create command line. Before I need to identify the ID of the new volume created with the xe pbd-list command :   I can see my new volume, the path and its name, /dev/disk/by-id/scsi-SATA_ST31000340NS_9QJ2EXS0, the first one in the previous list. Now I can create the logical volume to make it ready to execute my backup plan idea, I use the xe sr-create command line. You need to use the command bellow but don't forget to use your device ID, not mine, it won't work :) xe sr-create type=lvm content-type=user device-config:device=/dev/disk/by-id/YOURDEVICENAME name-label=MY_NEW_VOLUME_NAME and you should be just fine. The installation of the new drive is done and now we can download the OpenFiler appliance for XenServer here : http://www.openfiler.com/community/download/. Once downloaded, import the VM into XenServer and start it. To import the Openfiler XenServer appliance you can follow the instruction or you can skip this small part if you know how to proceed. Uncompress the archive you downloaded and in the Citrix XenCenter console do as follow : That's it, now you just need to wait a bit for the…

I needed to find a way to deploy XenDesktop 5 Desktop Delivery Controller on demand, and the best way to industrialize the auto insertion in a XenDesktop 5 existing site. Of course, as the environment will be very large, I have access to an automation software like Altiris, SCCM etc... You need to know, adding and removing XenDesktop controller from site require some privilege and rights on the database server. In large environment, this is not so easy to gain access to the database servers but at least you'll have the information and the script to send to the SQL DBA. First I install manually the first XenDesktop 5 server to configure database and have everything ready. This is a old XenApp habit and you'll see with the information bellow, you can even industrialize the installation and the site / database creation pretty easily. To do so, there is an executable XenDesktopServerSetup.exe on the DVD (x:\x64\XenDesktop Setup\XenDesktopServerSetup.exe) and if you type /? the information bellow appears : Here is the command line I used to deploy the DDC, without the Web Interface, database and license server, I also have disable the firewall with Active Directory GPOs so I don't use the /configure_firewall option. Don't forget the server where you chose to deploy XenDesktop 5 must be in an Active Directory Domain otherwise the installation will be fine but you won't be able to launch Desktop Studio (many error messages...) Now XenDesktop is installed but not configured. The next steps took me a while because there is no 1,2,3 manual to industrialize the integration of a new XenDesktop 5 server in a site, at least I didn't find any on the net... I wanted to download and install Citrix XenDesktop 5 SDK but it's already install by default with XD5, to check if you can use and access it, launch the PowerShell (Start/All Programs/Accessories/PowerShell) and type Asnp Citrix.* then Get-Command –Module Citrix.* to check if you're able to list all the command available to use. You should see the same list as bellow :   If you have some issue with the security in PowerShell, refer to the build-in help to set the proper level of execution security. To go further with all these Cmdlet, Citrix have online a webpage : CTX127254 where you can read and learn more about each Cmdlet. I made 3 scripts to get the information (1),…