We all need to automate things, we need to fast deploy, fast provision and stay lazy, not doing the same thing every day… So let check how we can industrialize XenDesktop 7 deployment (the easy part) and configuration (I guess the tricky part).

First to deploy XenDesktop 7 using command line is simple and very well documented [link]

Installs XenDesktop Server Options can be (see documentation for further details):

/COMPONENTS CONTROLLER, DESKTOPSTUDIO, DESKTOPDIRECTOR, LICENSESERVER, STOREFRONT

/EXCLUDE <package> 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

/REMOVE Remove components (instead of installing)

/CONFIGURE_FIREWALL Configure Windows Firewall

/NOSQL Do not install SQL Server Express 2012

/NO_REMOTE_ASSISTANCE Do not install Windows Remote Assistance when installing Director

I will add a second server to my existing deployment (1 DDC, Windows 2012 XenDesktop 7) my command line to install components I need look like :

XenDesktopServerSetup.exe /COMPONENTS CONTROLLER,DESKTOPSTUDIO /PASSIVE /NOREBOOT /NOSQL /CONFIGURE_FIREWALL

The XenDesktop 7 “Framework” is now installed but the is still configuration an Site join to automate.

Using Powershell this is an easy step as well :

Add-XDController -SiteControllerAddress ddc01.metal.inc(Name of one DDC)

This command line will update the database automatically, if you do not wish to, you need to specify it :

Add-XDController -SiteControllerAddress ddc01.metal.inc -DoNotUpdateDatabaseServer

Note : if you had DesktopStudio open, to show the change on the new DDC, refreshing the mmc is not enough, you need to close and open it again.

Last thing, to remove a DDC using command line, still with PowerShell :

Remove-XDController -SiteControllerAddress ddc02.metal.inc(Name of DDC you want to remove)

This command line will update the database automatically, if you do not wish to, you need to specify it :

Remove-XDController -SiteControllerAddress ddc02.metal.inc -DoNotUpdateDatabaseServer

Note : You must execute this commend another DDC than the one you want to remove.

So to sum-up, this is very easy to automate XenDesktop DDC deployment once the first DDC is set up. The next step will be to try to automate the first DDC installation and configuration.

18 444

  • Wayne

    Great post thanks Stephane. I will at some point create an MDT build for this. What are you using to automate?

    Cheers,

    Wayne

  • Hi Wayne,
    I use whatever technology is in place at my customer’s place, from self made deployment software to SCMM, Altiris etc..
    Stephane

  • Pingback: How-to create XenDesktop 7 database(s) unattended using PowerShell | sepago()

  • Sues_M

    Great Post about XD 7 Installation.. the most Effort will be to automate the hole Farm Creation process i think…

    Greetings Marco

  • Hi Sues_M

    I know and I’m on it, I just have few issue I need to go through to post a blog about that.

    Stephane

  • Pingback: Citrix XenDesktop 7 – Unattended from scratch | archy.net()

  • Pingback: Citrix XenDesktop 7 – Create Persistent Hypervisor Connection and Hosting Unit, Unattended | archy.net()

  • Hi Stéphane
    /NO_REMOTE_ASSISTANCE or /enableremoteassistance (as mentionned in eDocs)?

  • Hi Laurent,
    When you run a XenDesktopServerSetup.exe /? the option shown is /NO_REMOTE_ASSISTANCE which do not install Windows Remote Assistance when installing Director. And when you read eDocs it’s written : /EnableRemoteAssistance which isValid only when installing Director to enable the Windows Remote Assistance feature. Windows Remote Assistance is always installed when you install Director; you enable or disable the feature by including or omitting this option in the command line.

    Hmmm, another weirdness I guess…

    Stephane

  • MikeG

    Hi Staphane, I have been following your blog posts on Xenapp automation for quite some time and I would like to thank you for sharing your wealth of automation knowledge with the community.

    Not being a scripting guy myself, out of curiosity, I decided to try out your XD7 automation scripts and managed to get the “x64XenDesktop SetupXenDesktopServerSetup.exe” /COMPONENTS CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR /PASSIVE /NOREBOOT /CONFIGURE_FIREWALL /NOSQL /NO_REMOTE_ASSISTANCE” portion of the automated installer to work fine.

    I am a total novice at Powershell scripting also, I am having some difficulty with the DBCreation powershell scripts.

    The WIndows 2008R2 VM servers is built using a floppy image with Autounattend.xml method and use a batch file to invoke the powershell script. In my Autounattend.xml file I join the machine using the “LABAdministrator” to join the domain and enable Autologon using my Citrix Admin account “LABxd-admin”.

    The batch file runs under the context of “LABxd-admin” and although this account is a member of “LABCitrix Admins” which is nested in “LABDomain Admins” group. Furthermore I also add “LABCitrix Admins” group to the server local Administrators group.

    Despite having full Admin rights under “xd-admin” account for some reason I am not able to run the Powershell script successfully. However, if I login as Administrator on the server and run the script in a powershell console then it manages to complete and create the databases etc without any problems.

    Anyone with any ideas as to what I should do to make it work under my Citrix Admin account would be greatly appreciated.

    Many thanks
    M