So auto-install and auto join an already XenDesktop 7 Site is cool but what if you need to automate the first DDC installation ? Here is how I did with help of a great blog (Timm Brochhaus) who made a script available for everyone, and I personally used it.
Let’s do it for a full automated installation, I will install all the components from XenDesktop 7.
XenDesktopServerSetup.exe /COMPONENTS CONTROLLER,DESKTOPSTUDIO,DESKTOPDIRECTOR,LICENSESERVER,STOREFRONT /PASSIVE /NOREBOOT /CONFIGURE_FIREWALL /NOSQL
New-XDDatabase -AdminAddress DDC02 -SiteName TEST-archynet_SITE -DataStore Site -DatabaseServer APP01.metal.inc -DatabaseName XD7_archynet_Site -DatabaseCredentials metal.inc_XD
New-XDDatabase -AdminAddress DDC02 -SiteName TEST-archynet_SITE -DataStore Logging -DatabaseServer APP01.metal.inc -DatabaseName XD7_archynet_Logging -DatabaseCredentials metal.inc_XD
New-XDDatabase -AdminAddress DDC02 -SiteName TEST-archynet_SITE -DataStore Monitor -DatabaseServer APP01.metal.inc -DatabaseName XD7_archynet_Monitor -DatabaseCredentials Metal.inc_XD
Timm Brochhaus wrote a very cool blog and give you the explanation about a script he wrote to automate this part with a very useful script. Juts don’t forget to run this script in 32bit mode…. [link]
I did use Timm’s script and here is the result I got :
Name : XD7-DB_Site
DataStore : Site
ServerAddress : app01.metal.inc
MirrorServerAddress :
IntegratedSecurity : True
Name : XD7-DB_Logging
DataStore : Logging
ServerAddress : app01.metal.inc
MirrorServerAddress :
IntegratedSecurity : True
Name : XD7-DB_Monitor
DataStore : Monitor
ServerAddress : app01.metal.inc
MirrorServerAddress :
IntegratedSecurity : True
3 databases were created, one for the Site informations, one for the log informations and a last one for monitoring (edgesight-like)
Now we are ready for the next step which is site creation with the command New-XDSite
New-XDSite -DatabaseServer app01.metal.inc -LoggingDatabaseName XD7-DB_Logging -MonitorDatabaseName XD7-DB_Monitor -SiteDatabaseName XD7-DB_Site -SiteName TEST_SITE2 -AdminAddress DDC02
with the result :
Name : TEST_SITE2
Controllers : {METALDDC02}
Databases : {Site, Logging, Monitor}
DefaultIconUid : 1
LicenseInformation : PLT
Metadata : {[Citrix_StoreFront_Cluster_Id, 29eaffbb-0915-47a2-a856-641ec5703ef1], [ConfiguredComponents, Admin Config Log Acct Hyp Prov Broker Lic Monitor Pvs Sf
UpmSdk EnvTest AppV], [Studio_SiteConfigurationComplete, True]}
If I use the script Timm make available and use the same syntax, this is pretty easy to add this line and add what we need to automate DataBase creation + Site creation in one script :
$DatabaseServer = "serverbdd.domain.inc"
$DatabaseName_Site = "XD7-DB_Site"
$DatabaseName_Logging = "XD7-DB_Logging"
$DatabaseName_Monitor = "XD7-DB_Monitor"
# Database user must be sysadmin on db server
$DatabaseUser = "DomainUsername"
$DatabasePassword = "********"
$XD7Site = "XD7TEST"
$DatabasePassword = $DatabasePassword | ConvertTo-SecureString -asPlainText -Force
$Database_CredObject = New-Object System.Management.Automation.PSCredential($DatabaseUser,$DatabasePassword)
Add-PSSnapin Citrix.*
New-XDDatabase -AdminAddress $env:COMPUTERNAME -SiteName $XD7Site -DataStore Site -DatabaseServer $DatabaseServer -DatabaseName $DatabaseName_Site -DatabaseCredentials $Database_CredObject
New-XDDatabase -AdminAddress $env:COMPUTERNAME -SiteName $XD7Site -DataStore Logging -DatabaseServer $DatabaseServer -DatabaseName $DatabaseName_Logging -DatabaseCredentials $Database_CredObject
New-XDDatabase -AdminAddress $env:COMPUTERNAME -SiteName $XD7Site -DataStore Monitor -DatabaseServer $DatabaseServer -DatabaseName $DatabaseName_Monitor -DatabaseCredentials $Database_CredObject
New-XDSite -DatabaseServer $DatabaseServer -LoggingDatabaseName $DatabaseName_Logging -MonitorDatabaseName $DatabaseName_Monitor -SiteDatabaseName $DatabaseName_Site -SiteName $XD7Site -AdminAddress $env:COMPUTERNAME -DatabaseCredentials $Database_CredObject
So now your XenDesktop 7 DDC is ready to work, you can launch the Desktop Studio console, you just need to create your Machine Catalogs and Delivery Groups etc… This next part of automation is in my next blog about XenDesktop 7